Skip to content

Commit

Permalink
add CDF
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunyez committed Oct 6, 2023
1 parent fec88a5 commit 3c16ff8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vse_sync_pp/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c16ff8

Please sign in to comment.