mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-12-17 16:21:11 +08:00
time-based histograms: docs and test
This commit is contained in:
@@ -39,7 +39,7 @@ BEGIN {
|
||||
}
|
||||
}
|
||||
|
||||
use Test::More tests => 92;
|
||||
use Test::More tests => 94;
|
||||
use File::Temp 'tempfile';
|
||||
use IPC::Run 'run';
|
||||
use String::ShellQuote;
|
||||
@@ -346,6 +346,13 @@ tryplot( testname => 'Circles',
|
||||
options => [qw(--circles --domain)],
|
||||
refplot => 'circles.ref' );
|
||||
|
||||
tryplot( testname => '--timefmt --histo',
|
||||
cmd => q{seq 10 | gawk '{x=(NR-1)%5; print strftime("%Y-%m-%d--%H:%M:%S",1382249107+x,1)}' | grep -v ':09'},
|
||||
options => ['--timefmt', '%Y-%m-%d--%H:%M:%S', '--histogram', '0','--binwidth', '1',
|
||||
'--set', q{format x "...-%M:%S"},
|
||||
'--ymax', '2.5'],
|
||||
refplot => 'timefmt-histo.ref' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
39
t/timefmt-histo.ref
Normal file
39
t/timefmt-histo.ref
Normal file
@@ -0,0 +1,39 @@
|
||||
2.5 +-----------------------------------------------------------------------------------------+
|
||||
| + + + + + |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
2 |-+ ******************************* ******************************* +-|
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
1.5 |-+ * * * * * * +-|
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
1 |-+ * * * * * * +-|
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
0.5 |-+ * * * * * * +-|
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * * * * * * |
|
||||
| * + * + * + * + * + * |
|
||||
0 +-----------------------------------------------------------------------------------------+
|
||||
...-05:06 ...-05:07 ...-05:08 ...-05:09 ...-05:10 ...-05:11 ...-05:12
|
||||
|
||||
Reference in New Issue
Block a user