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

[WIP] Add group argument to plot_joint #1012

Merged
merged 12 commits into from
Jan 20, 2020
Merged
5 changes: 4 additions & 1 deletion arviz/plots/jointplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

def plot_joint(
data,
group="posterior",
var_names=None,
coords=None,
figsize=None,
Expand All @@ -29,6 +30,8 @@ def plot_joint(
data : obj
Any object that can be converted to an az.InferenceData object
Refer to documentation of az.convert_to_dataset for details
group : str, optional
Specifies which InferenceData group should be plotted. Defaults to ‘posterior’.
var_names : str or iterable of str
Variables to be plotted. iter of two variables or one variable (with subset having
exactly 2 dimensions) are required.
Expand Down Expand Up @@ -131,7 +134,7 @@ def plot_joint(
("Plot type {} not recognized." "Plot type must be in {}").format(kind, valid_kinds)
)

data = convert_to_dataset(data, group="posterior")
data = convert_to_dataset(data, group=group)

if coords is None:
coords = {}
Expand Down
2 changes: 1 addition & 1 deletion arviz/plots/ppcplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def plot_ppc(

>>> import arviz as az
>>> data = az.load_arviz_data('radon')
>>> az.plot_ppc(data)
>>> az.plot_ppc(data,data_pairs={"obs":"obs"})

Plot the overlay with empirical CDFs.

Expand Down
2 changes: 1 addition & 1 deletion examples/matplotlib/mpl_plot_ppc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
az.style.use("arviz-darkgrid")

data = az.load_arviz_data("non_centered_eight")
az.plot_ppc(data, alpha=0.03, figsize=(12, 6), textsize=14)
az.plot_ppc(data, data_pairs={"obs": "obs"}, alpha=0.03, figsize=(12, 6), textsize=14)