Skip to content

Commit

Permalink
Adding example for coords argument in documentation (arviz-devs#1566)
Browse files Browse the repository at this point in the history
* Added Dataframe to InfData Example

* Added coords argument examples in documentation

* Updated coords argument example in docstring
  • Loading branch information
Rishabh261998 authored and utkarsh-maheshwari committed May 27, 2021
1 parent 8280893 commit 7599b7d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@

## v0.x.x Unreleased
### New features
* Added `to_zarr` and `from_zarr` methods to InferenceData ([1518](https://github.com/arviz-devs/arviz/pull/1535))
* Added `to_zarr` and `from_zarr` methods to InferenceData ([1518](https://github.com/arviz-devs/arviz/pull/1518))
* Added confidence interval band to auto-correlation plot ([1535](https://github.com/arviz-devs/arviz/pull/1535))

### Maintenance and fixes
Expand All @@ -17,6 +17,7 @@

### Documentation
* Added an example for converting dataframe to InferenceData ([1556](https://github.com/arviz-devs/arviz/pull/1556))
* Added example for `coords` argument in `plot_posterior` docstring ([1566](https://github.com/arviz-devs/arviz/pull/1566))

## v0.11.1 (2021 Feb 2)
### Maintenance and fixes
Expand Down
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)
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)
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
}
}

0 comments on commit 7599b7d

Please sign in to comment.