Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_ppc_rootogram: fix examples #144

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/gallery/model_criticism/plot_ppc_rootogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
dt = load_arviz_data("rugby")
pc = azp.plot_ppc_rootogram(
dt,
pc_kwargs={"aes": {"color": ["__variable__"]}}, # map variable to color
aes_map={"title": ["color"]}, # change title's color per variable
backend="none",
)
pc.show()
4 changes: 1 addition & 3 deletions src/arviz_plots/plots/ppcrootogramplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def plot_ppc_rootogram(
>>> from arviz_plots import plot_ppc_rootogram, style
>>> style.use("arviz-variat")
>>> from arviz_base import load_arviz_data
>>> dt = load_arviz_data('crabs')
>>> dt = load_arviz_data('crabs_poisson')
>>> plot_ppc_rootogram(dt)


Expand Down Expand Up @@ -206,8 +206,6 @@ def plot_ppc_rootogram(

aes_map.setdefault("predictive_markers", plot_collection.aes_set)
aes_map.setdefault("ci", plot_collection.aes_set)
# aes_map.setdefault("predictive_markers", ["color"])
# aes_map.setdefault("ci", ["color"])
## predictive_markers
predictive_ms_kwargs = copy(plot_kwargs.get("predictive_markers", {}))

Expand Down