From 35115083ce43e7898420bee3d7c94e5682527eff Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 22 Jul 2021 11:23:48 -0700 Subject: [PATCH] --histo with a --timefmt makes time-based histograms Not documented yet or added to the tests yet, but appears to work --- bin/feedgnuplot | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 9249e71..b31e5b1 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -841,10 +841,16 @@ sub mainThread addOption($_, 'extraoptions', 'axes x2y2 ') foreach (@{$options{x2y2}}); # timefmt + my $histcol; if( $options{timefmt} ) { print(PIPE "set timefmt '$options{timefmt}'\n"); print(PIPE "set xdata time\n"); + $histcol = qq{timecolumn(2,"$options{timefmt}")}; + } + else + { + $histcol = '$2'; } # set up histograms @@ -859,7 +865,7 @@ sub mainThread # domain, so I get the statistics of the 2nd column: $2 addOption($id, 'usingoptions', - 'using (histbin($2)):(1.0) smooth ' . $options{histstyle}, + 'using (histbin(' . $histcol . ')):(1.0) smooth ' . $options{histstyle}, 'do-not-override'); }