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

Adding example for coords argument in documentation #1566

Merged
merged 3 commits into from Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions arviz/plots/posteriorplot.py
Expand Up @@ -149,6 +149,13 @@ def plot_posterior(
>>> rope = {'mu': [{'rope': (-2, 2)}], 'theta': [{'school': 'Choate', 'rope': (2, 4)}]}
>>> az.plot_posterior(data, var_names=['mu', 'theta'], rope=rope)

Adding Coordinates(coords) for distributions selection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Using `coords` argument to plot only a subset of data?


.. plot::
:context: close-figs

>>> coords = {"school": ["Choate","Phillips Exeter"]}
>>> az.plot_posterior(data, var_names=["mu", "theta"], coords=coords, rope=(-1, 1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the rope to focus on coords usage.


Add reference lines

Expand Down
2 changes: 1 addition & 1 deletion doc/source/getting_started/CreatingInferenceData.ipynb
Expand Up @@ -29507,4 +29507,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}