From d32da60486fc58005f1231f48f20084998de0adc Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 21:49:45 +0530 Subject: [PATCH 01/11] fixing 843 --- examples/matplotlib/mpl_plot_ppc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/matplotlib/mpl_plot_ppc.py b/examples/matplotlib/mpl_plot_ppc.py index 53ff435faa..1d4c190e0f 100644 --- a/examples/matplotlib/mpl_plot_ppc.py +++ b/examples/matplotlib/mpl_plot_ppc.py @@ -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) From 1599ea2d2ea30fefae23ce1aa8b849c4a195c059 Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 21:52:07 +0530 Subject: [PATCH 02/11] fix 843 docstring --- arviz/plots/ppcplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arviz/plots/ppcplot.py b/arviz/plots/ppcplot.py index 23ef64c668..ef6f4a3f16 100644 --- a/arviz/plots/ppcplot.py +++ b/arviz/plots/ppcplot.py @@ -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. From 20c13dffbf53ef7af922fa44f02b4a9306a7e1f1 Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 22:00:16 +0530 Subject: [PATCH 03/11] fix 843- --- examples/matplotlib/mpl_plot_ppc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/matplotlib/mpl_plot_ppc.py b/examples/matplotlib/mpl_plot_ppc.py index 1d4c190e0f..8f3ed492eb 100644 --- a/examples/matplotlib/mpl_plot_ppc.py +++ b/examples/matplotlib/mpl_plot_ppc.py @@ -9,4 +9,4 @@ az.style.use("arviz-darkgrid") data = az.load_arviz_data("non_centered_eight") -az.plot_ppc(data, data_pairs={"obs":"obs"}, alpha=0.03, figsize=(12, 6), textsize=14) +az.plot_ppc(data, data_pairs={"obs": "obs"}, alpha=0.03, figsize=(12, 6), textsize=14) From 652b03a66d7f53b2613201f871000d51b85aab6f Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Fri, 17 Jan 2020 20:03:26 +0530 Subject: [PATCH 04/11] To fix #1004 --- arviz/plots/jointplot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py index b73f350b41..95f4b48d6e 100644 --- a/arviz/plots/jointplot.py +++ b/arviz/plots/jointplot.py @@ -6,6 +6,7 @@ def plot_joint( data, + group="posterior" var_names=None, coords=None, figsize=None, @@ -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 : Optional[str] + 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. @@ -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 = {} From 6637ccc54c4c29c610f944fdaffd23b772c46c0c Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Fri, 17 Jan 2020 20:17:49 +0530 Subject: [PATCH 05/11] Revert "To fix #1004" This reverts commit 652b03a66d7f53b2613201f871000d51b85aab6f. --- arviz/plots/jointplot.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py index 95f4b48d6e..b73f350b41 100644 --- a/arviz/plots/jointplot.py +++ b/arviz/plots/jointplot.py @@ -6,7 +6,6 @@ def plot_joint( data, - group="posterior" var_names=None, coords=None, figsize=None, @@ -30,8 +29,6 @@ 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 : Optional[str] - 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. @@ -134,7 +131,7 @@ def plot_joint( ("Plot type {} not recognized." "Plot type must be in {}").format(kind, valid_kinds) ) - data = convert_to_dataset(data, group=group) + data = convert_to_dataset(data, group="posterior") if coords is None: coords = {} From ac04375f93445f3971e2e75aeb59496fc0cf907e Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 21:49:45 +0530 Subject: [PATCH 06/11] fixing 843 --- examples/matplotlib/mpl_plot_ppc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/matplotlib/mpl_plot_ppc.py b/examples/matplotlib/mpl_plot_ppc.py index 53ff435faa..1d4c190e0f 100644 --- a/examples/matplotlib/mpl_plot_ppc.py +++ b/examples/matplotlib/mpl_plot_ppc.py @@ -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) From 38d2fe4604a0c9e3984a50fb9ed06c43c1461ef3 Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 21:52:07 +0530 Subject: [PATCH 07/11] fix 843 docstring --- arviz/plots/ppcplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arviz/plots/ppcplot.py b/arviz/plots/ppcplot.py index 23ef64c668..ef6f4a3f16 100644 --- a/arviz/plots/ppcplot.py +++ b/arviz/plots/ppcplot.py @@ -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. From 1717ceb80b667530fc46a8c9aca8a45b6ef47888 Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Wed, 15 Jan 2020 22:00:16 +0530 Subject: [PATCH 08/11] fix 843- --- examples/matplotlib/mpl_plot_ppc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/matplotlib/mpl_plot_ppc.py b/examples/matplotlib/mpl_plot_ppc.py index 1d4c190e0f..8f3ed492eb 100644 --- a/examples/matplotlib/mpl_plot_ppc.py +++ b/examples/matplotlib/mpl_plot_ppc.py @@ -9,4 +9,4 @@ az.style.use("arviz-darkgrid") data = az.load_arviz_data("non_centered_eight") -az.plot_ppc(data, data_pairs={"obs":"obs"}, alpha=0.03, figsize=(12, 6), textsize=14) +az.plot_ppc(data, data_pairs={"obs": "obs"}, alpha=0.03, figsize=(12, 6), textsize=14) From f1f7dd528b6cc3c3d129502829a4fbd0031a0ab4 Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Fri, 17 Jan 2020 20:03:26 +0530 Subject: [PATCH 09/11] To fix #1004 --- arviz/plots/jointplot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py index b73f350b41..95f4b48d6e 100644 --- a/arviz/plots/jointplot.py +++ b/arviz/plots/jointplot.py @@ -6,6 +6,7 @@ def plot_joint( data, + group="posterior" var_names=None, coords=None, figsize=None, @@ -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 : Optional[str] + 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. @@ -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 = {} From b0fbb667fa68e5c84e5ded248e26cf7a6d74f08a Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Fri, 17 Jan 2020 20:17:49 +0530 Subject: [PATCH 10/11] Revert "To fix #1004" This reverts commit 652b03a66d7f53b2613201f871000d51b85aab6f. --- arviz/plots/jointplot.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py index 95f4b48d6e..b73f350b41 100644 --- a/arviz/plots/jointplot.py +++ b/arviz/plots/jointplot.py @@ -6,7 +6,6 @@ def plot_joint( data, - group="posterior" var_names=None, coords=None, figsize=None, @@ -30,8 +29,6 @@ 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 : Optional[str] - 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. @@ -134,7 +131,7 @@ def plot_joint( ("Plot type {} not recognized." "Plot type must be in {}").format(kind, valid_kinds) ) - data = convert_to_dataset(data, group=group) + data = convert_to_dataset(data, group="posterior") if coords is None: coords = {} From 18fa1d01803a5f7c58bfe186c47035b89741438d Mon Sep 17 00:00:00 2001 From: Arunava Mukhoti Date: Sat, 18 Jan 2020 15:18:17 +0530 Subject: [PATCH 11/11] To fix #1004 --- arviz/plots/jointplot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py index b73f350b41..86ae989eb8 100644 --- a/arviz/plots/jointplot.py +++ b/arviz/plots/jointplot.py @@ -6,6 +6,7 @@ def plot_joint( data, + group="posterior", var_names=None, coords=None, figsize=None, @@ -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. @@ -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 = {}