Gary, Thanks for the very clear explanation. I guess I was a bit lazy. After reading your post I found the documentation for it here, http://www.weewx.com/docs/5.1/reference/skin-options/imagegenerator/#line_gap_fraction Also, digging into the code seems to confirm that null/None values will always cause a break. See, https://github.com/weewx/weewx/blob/95210c4e6008b67c14220157e4a7934c1e03bd42/src/weeplot/utilities.py#L472 - rich
On Friday 19 July 2024 at 20:49:55 UTC-4 gjr80 wrote: > On Saturday 20 July 2024 at 07:42:39 UTC+10 [email protected] wrote: > > I don’t fully understand the `line_gap_fraction` option. But I seem to > remember that `None` values will always cause a break in the plot… > > > line_gap_fraction does seem a little mystical in operation but once you > understand how it works it is fairly easy to use. Think of > line_gap_fraction as the proportion of the overall x-axis timeframe that > the plot engine considers to be a gap in data. So for a typical day plot > (27 hours or 97200 seconds) a line_gap_fraction of 0.05 means that any > gap in time between successive plot points of 4860 seconds (81 minutes) or > longer will be considered a gap and result in a gap in the plotted line. If > line_gap_fraction > = 0.01 the gap drops to 16.2 minutes. So for data with a 15 minute > archive period a line_gap_fraction = 0.01 will plot a continuous line > provided there are no missing points. Any missing points result in a gap of > at least 30 minutes so line_gap_fraction = 0.01 will result in gaps. In > this case a line_gap_fraction = 0.02 or greater is required. The default > line_gap_fraction > = 0.05 should work fine. If it is not then something else is amiss (first > thing that springs to mind is the possibility that line_gap_fraction is > being overridden somewhere in the respective skin.conf or weewx.conf). > > The same applies for week, month and year plots, but you now apply > line_gap_fraction to a much longer overall x-axis timeframe meaning the > gap in seconds for a given line_gap_fraction value is greater . Also, > week, month and year plots by default plot an aggregate so the data points > are now spaced every 'aggregate interval' seconds and not necessarily every > 'archive period' seconds. > > Also, when line_gap_fraction is omitted (or set to a value <0 or >1) any > missing data points will be considered a gap and plotted as such. In this > case you definitely do not want to omit line_gap_fraction or you will > always have gaps. > > Gary > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ad0dbf5b-ddf3-4b8c-a195-030246165461n%40googlegroups.com.
