Skip to content

Commit

Permalink
Adding Plot ESS Evolution (#71)
Browse files Browse the repository at this point in the history
* Initial ess evolution plot

updated plot_ess_evolution including a common ess_dataset computing func

added mean and sd annotations like essplot

docs and example gallery for plot_ess_evolution

updated verticalalign logic for mean/sd and correct (although overlaid and not flattened yet) rug is now displayed

removed rug plot

added tests

updated scatter_xy func to plot_ess version

fixed docstring

altered store_artist for xlabel, ylabel and modified hypothesis tests

shifted mean_ess, sd_edd computing to before plot_kwargs check+artist plotting logic

updated docstring, added figsizing and set vertical_align for mean and sd text kwargs as setdefault

removed 'rankdata' branch of arviz-stats from dependencies

docstring typo fix

gallery-generator updated for documentation building

* remove visual duplicated when rebasing

---------

Co-authored-by: Oriol (ProDesk) <[email protected]>
  • Loading branch information
imperorrp and OriolAbril authored Oct 17, 2024
1 parent e316faa commit 71223f5
Show file tree
Hide file tree
Showing 8 changed files with 742 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/source/api/plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ A complementary introduction and guide to ``plot_...`` functions is available at
plot_compare
plot_dist
plot_ess
plot_ess_evolution
plot_forest
plot_ridge
plot_trace
plot_trace_dist
plot_trace_dist
1 change: 1 addition & 0 deletions docs/source/api/visuals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Data plotting elements
line_x
scatter_xy
scatter_x
scatter_xy
ecdf_line
hist

Expand Down
21 changes: 21 additions & 0 deletions docs/source/gallery/inference_diagnostics/plot_ess_evolution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
# ESS Evolution plot
Facetted plot with ESS 'bulk' and 'tail' for each variable
---
:::{seealso}
API Documentation: {func}`~arviz_plots.plot_ess_evolution`
:::
"""

from arviz_base import load_arviz_data

import arviz_plots as azp

azp.style.use("arviz-clean")

data = load_arviz_data("centered_eight")
pc = azp.plot_ess_evolution(data, backend="none") # change to preferred backend
pc.show()
2 changes: 1 addition & 1 deletion docs/sphinxext/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def main(app):

index_page = ["(example_gallery)=\n# Example gallery"]
backreferences = defaultdict(list)
api_regex = re.compile(r"azp\.(plot_[a-z]+)\(")
api_regex = re.compile(r"azp\.(plot_[a-z_]+)\(")

for folder, title in dir_title_map.items():
category_dir = gallery_dir / folder
Expand Down
2 changes: 2 additions & 0 deletions src/arviz_plots/plots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .compareplot import plot_compare
from .distplot import plot_dist
from .essplot import plot_ess
from .evolutionplot import plot_ess_evolution
from .forestplot import plot_forest
from .ridgeplot import plot_ridge
from .tracedistplot import plot_trace_dist
Expand All @@ -15,5 +16,6 @@
"plot_trace",
"plot_trace_dist",
"plot_ess",
"plot_ess_evolution",
"plot_ridge",
]
Loading

0 comments on commit 71223f5

Please sign in to comment.