From ce254004ac7e0fe3917d687a54d060dc5a2d9c9a Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Fri, 2 Dec 2022 12:26:39 +0100 Subject: [PATCH] add ecdf comparison plot --- .../matplotlib/mpl_plot_ecdf_comparison.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/matplotlib/mpl_plot_ecdf_comparison.py diff --git a/examples/matplotlib/mpl_plot_ecdf_comparison.py b/examples/matplotlib/mpl_plot_ecdf_comparison.py new file mode 100644 index 0000000000..8567110cf3 --- /dev/null +++ b/examples/matplotlib/mpl_plot_ecdf_comparison.py @@ -0,0 +1,18 @@ +""" +ECDF Plot (Comparison) +====================== +_gallery_category: Distribution Comparison +""" +import matplotlib.pyplot as plt +from scipy.stats import norm + +import arviz as az + +az.style.use("arviz-doc") + +sample1 = norm(0, 1).rvs(1000, random_state=523) +sample2 = norm(0.1, 1).rvs(1000, random_state=74) + +az.plot_ecdf(sample1, sample2, difference=True, confidence_bands=True, fpr=.1) + +plt.show()