From 23c97f8d0174bceea44f265325940feee7b615cf Mon Sep 17 00:00:00 2001 From: Iara Ota Date: Mon, 13 Nov 2023 18:06:05 -0600 Subject: [PATCH] remove range smaller than 1 for cumulative histogram --- gwsumm/plot/builtin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gwsumm/plot/builtin.py b/gwsumm/plot/builtin.py index 8037f221..154fca7c 100644 --- a/gwsumm/plot/builtin.py +++ b/gwsumm/plot/builtin.py @@ -722,6 +722,11 @@ def draw(self, outputfile=None): xlim=None if ax.get_autoscalex_on() else ax.get_xlim(), ) + # Remove data with range smaller than 1 Mpc for cumulative plot + if self.type == 'range-cumulative-histogram': + arr = numpy.array(arr) + arr = arr[arr>=1] + # plot histogram _, _, patches = ax.hist(arr, **pargs)