From 3c16ff8e685299cda3e9a239b46fe702e0803c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Nu=C3=B1ez?= Date: Fri, 6 Oct 2023 14:59:14 -0400 Subject: [PATCH] add CDF --- src/vse_sync_pp/plot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vse_sync_pp/plot.py b/src/vse_sync_pp/plot.py index c236958..b673ce8 100644 --- a/src/vse_sync_pp/plot.py +++ b/src/vse_sync_pp/plot.py @@ -55,11 +55,13 @@ def _plot_hist(self, ax): bins='scott', ) ax.hist(bins[:-1], bins, weights=counts) + ax.ecdf(np.array(self._Y_data, dtype=float), complementary=True, label="CDF") # noqa self._set_yscale(ax) if self._x.scale is not None: ax.set_xscale(self._x.scale, **(self._x.scale_kwargs or {})) ax.set_title(f'Histogram of {self._y.desc}') + def plot(self, filename): """Plot data to `filename`""" fig, (ax1, ax2) = plt.subplots(2, constrained_layout=True)