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

Conversation

Rishabh261998
Copy link
Contributor

@Rishabh261998 Rishabh261998 commented Feb 15, 2021

Description

This PR is created to fix #1436

Checklist

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #1566 (78ac4e9) into main (f4606e4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1566   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files         105      105           
  Lines       11397    11397           
=======================================
  Hits        10289    10289           
  Misses       1108     1108           
Impacted Files Coverage Δ
arviz/plots/posteriorplot.py 90.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f4606e4...07351de. Read the comment docs.

@Rishabh261998
Copy link
Contributor Author

Hi @OriolAbril could you check this PR and suggest any changes if any. Thank You

: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.

@@ -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?

@OriolAbril
Copy link
Member

Note I have also edited the PR description to have the issue closed automatically when merging, you can read more about this feature here: https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

@Rishabh261998
Copy link
Contributor Author

Did the changes and also added a point in the CHANGELOG.md

@OriolAbril
Copy link
Member

thanks!

@OriolAbril OriolAbril merged commit 5153f6d into arviz-devs:main Feb 15, 2021
utkarsh-maheshwari pushed a commit to utkarsh-maheshwari/arviz that referenced this pull request May 27, 2021
* Added Dataframe to InfData Example

* Added coords argument examples in documentation

* Updated coords argument example in docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an examples of coords argument in documentation
2 participants