Skip to content

Commit

Permalink
DOC: add api examples for plot_ppc (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattboggess authored and ColCarroll committed Oct 22, 2018
1 parent 03d9f5d commit 3bcc67b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arviz/plots/ppcplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@ def plot_ppc(
Returns
-------
axes : matplotlib axes
Examples
--------
Plot the observed data KDE overlaid on posterior predictive KDEs.
.. plot::
:context: close-figs
>>> import arviz as az
>>> data = az.load_arviz_data('radon')
>>> az.plot_ppc(data)
Plot the overlay with empirical CDFs.
.. plot::
:context: close-figs
>>> az.plot_ppc(data, kind='cumulative')
"""
for group in ("posterior_predictive", "observed_data"):
if not hasattr(data, group):
Expand Down

0 comments on commit 3bcc67b

Please sign in to comment.