mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-05 22:11:12 +08:00
added tests for --xticlabels
This commit is contained in:
parent
2f12f076e1
commit
4bef974306
39
t/basic-xticlabels-domain.ref
Normal file
39
t/basic-xticlabels-domain.ref
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
5 +-------------------------------------------------------------------------------------------+
|
||||||
|
| + + * + * + |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
4 |-+ ############# +-|
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
3 |-+ ************* # # +-|
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
| * * # # |
|
||||||
|
2 |-+ ***********############# # #*********** +-|
|
||||||
|
| * # # # # * |
|
||||||
|
| * # # # # * |
|
||||||
|
| * # # # # * |
|
||||||
|
| * # # # # * |
|
||||||
|
| * # # # # * |
|
||||||
|
| * # # # # * |
|
||||||
|
1 |-+ ############ # # ############ +-|
|
||||||
|
| # # # # # # |
|
||||||
|
| # # # # # # |
|
||||||
|
| # # # # # # |
|
||||||
|
| # # # # # # |
|
||||||
|
| # # # # # # |
|
||||||
|
| # + # + # # + # + # |
|
||||||
|
0 +-------------------------------------------------------------------------------------------+
|
||||||
|
aaa bbb ccc ddd
|
||||||
|
|
39
t/basic-xticlabels-no-domain.ref
Normal file
39
t/basic-xticlabels-no-domain.ref
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
5 +-------------------------------------------------------------------------------------------+
|
||||||
|
| + + * + * + |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
4 |-+ ################### +-|
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
| # # |
|
||||||
|
3 |-+ ******************# # +-|
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
2 |-+ *******************################### #******************* +-|
|
||||||
|
| * # # # * |
|
||||||
|
| * # # # * |
|
||||||
|
| * # # # * |
|
||||||
|
| * # # # * |
|
||||||
|
| * # # # * |
|
||||||
|
| * # # # * |
|
||||||
|
1 |-+ #################### # #################### +-|
|
||||||
|
| # # # # # |
|
||||||
|
| # # # # # |
|
||||||
|
| # # # # # |
|
||||||
|
| # # # # # |
|
||||||
|
| # # # # # |
|
||||||
|
| # + # + # + # + # |
|
||||||
|
0 +-------------------------------------------------------------------------------------------+
|
||||||
|
aaa bbb ccc ddd
|
||||||
|
|
59
t/plots.t
59
t/plots.t
@ -39,7 +39,7 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use Test::More tests => 60;
|
use Test::More tests => 82;
|
||||||
use File::Temp 'tempfile';
|
use File::Temp 'tempfile';
|
||||||
use IPC::Run 'run';
|
use IPC::Run 'run';
|
||||||
use String::ShellQuote;
|
use String::ShellQuote;
|
||||||
@ -221,6 +221,63 @@ tryplot( testname => 'timefmt with vnl with style',
|
|||||||
'--style', 'b', 'with lines lt 5' ],
|
'--style', 'b', 'with lines lt 5' ],
|
||||||
refplot => 'timefmt-with-vnl-with-style.ref' );
|
refplot => 'timefmt-with-vnl-with-style.ref' );
|
||||||
|
|
||||||
|
my $data_xticlabels = <<EOF;
|
||||||
|
# x label a b
|
||||||
|
5 aaa 2 1
|
||||||
|
6 bbb 3 2
|
||||||
|
10 ccc 5 4
|
||||||
|
11 ddd 2 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
tryplot( testname => 'basic xticlabels no domain',
|
||||||
|
cmd => qq{echo "$data_xticlabels" | vnl-filter -p label,a,b},
|
||||||
|
options => ['--vnl',
|
||||||
|
'--xticlabels',
|
||||||
|
'--with', 'boxes fill solid border lt -1',
|
||||||
|
'--ymin', '0'],
|
||||||
|
refplot => 'basic-xticlabels-no-domain.ref' );
|
||||||
|
|
||||||
|
tryplot( testname => 'basic xticlabels domain',
|
||||||
|
cmd => qq{echo "$data_xticlabels"},
|
||||||
|
options => [qw(--vnl --domain),
|
||||||
|
'--xticlabels',
|
||||||
|
'--with', 'boxes fill solid border lt -1',
|
||||||
|
'--ymin', '0'],
|
||||||
|
refplot => 'basic-xticlabels-domain.ref' );
|
||||||
|
|
||||||
|
tryplot( testname => 'xticlabels clustered',
|
||||||
|
cmd => qq{echo "$data_xticlabels" | vnl-filter -p label,a,b},
|
||||||
|
options => [qw(--vnl),
|
||||||
|
'--xticlabels',
|
||||||
|
'--set', 'style data histogram',
|
||||||
|
'--set', 'style histogram cluster gap 2',
|
||||||
|
'--set', 'style fill solid border lt -1',
|
||||||
|
'--ymin', '0'],
|
||||||
|
refplot => 'xticlabels-clustered.ref' );
|
||||||
|
|
||||||
|
tryplot( testname => 'xticlabels styles',
|
||||||
|
cmd => qq{echo "$data_xticlabels"},
|
||||||
|
options => [qw(--vnl --domain),
|
||||||
|
'--xticlabels',
|
||||||
|
'--style', 'a', 'with points',
|
||||||
|
'--style', 'b', 'with lines',
|
||||||
|
'--xmin', '4.5',
|
||||||
|
'--xmax', '11.5',
|
||||||
|
'--ymin', '0',
|
||||||
|
'--ymax', '6'],
|
||||||
|
refplot => 'xticlabels-styles.ref' );
|
||||||
|
|
||||||
|
tryplot( testname => 'xticlabels styles with tuplesize',
|
||||||
|
cmd => qq{echo "$data_xticlabels"},
|
||||||
|
options => [qw(--vnl --domain),
|
||||||
|
'--xticlabels',
|
||||||
|
'--tuplesizeall', '3',
|
||||||
|
'--with', 'linespoints pt variable',
|
||||||
|
'--xmin', '4.5',
|
||||||
|
'--xmax', '11.5',
|
||||||
|
'--ymin', '0',
|
||||||
|
'--ymax', '6'],
|
||||||
|
refplot => 'xticlabels-styles-with-tuplesize.ref' );
|
||||||
|
|
||||||
SKIP:
|
SKIP:
|
||||||
{
|
{
|
||||||
|
39
t/xticlabels-clustered.ref
Normal file
39
t/xticlabels-clustered.ref
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
5 +-------------------------------------------------------------------------------------------+
|
||||||
|
| + + * * + |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
| * * |
|
||||||
|
4 |-+ * ###### +-|
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
| * # # |
|
||||||
|
3 |-+ ****** * # # +-|
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
| * * * # # |
|
||||||
|
2 |-+ ***** * ##### * # # ****** +-|
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
| * * * # # * # # * * |
|
||||||
|
1 |-+ * ###### * # # * # # * ##### +-|
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
| * # # * # # * # # * # # |
|
||||||
|
0 +-------------------------------------------------------------------------------------------+
|
||||||
|
aaa bbb ccc ddd
|
||||||
|
|
39
t/xticlabels-styles-with-tuplesize.ref
Normal file
39
t/xticlabels-styles-with-tuplesize.ref
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
6 +-------------------------------------------------------------------------------------------+
|
||||||
|
| + + + + |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
5 |-+ **D +-|
|
||||||
|
| **** * |
|
||||||
|
| **** * |
|
||||||
|
| ***** * |
|
||||||
|
| **** * |
|
||||||
|
| **** * |
|
||||||
|
4 |-+ ***** * +-|
|
||||||
|
| **** * |
|
||||||
|
| **** * |
|
||||||
|
| ***** * |
|
||||||
|
| **** * |
|
||||||
|
| **** * |
|
||||||
|
3 |-+ *B** * +-|
|
||||||
|
| ** * |
|
||||||
|
| ** * |
|
||||||
|
| ** * |
|
||||||
|
| ** * |
|
||||||
|
| ** * |
|
||||||
|
2 |-+ A* A +-|
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
1 |-+ +-|
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| + + + + |
|
||||||
|
0 +-------------------------------------------------------------------------------------------+
|
||||||
|
aaa bbb ccc ddd
|
||||||
|
|
39
t/xticlabels-styles.ref
Normal file
39
t/xticlabels-styles.ref
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
6 +-------------------------------------------------------------------------------------------+
|
||||||
|
| + + + + |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
5 |-+ A +-|
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
4 |-+ ### +-|
|
||||||
|
| #### # |
|
||||||
|
| #### # |
|
||||||
|
| ##### # |
|
||||||
|
| #### # |
|
||||||
|
| #### # |
|
||||||
|
3 |-+ A ##### # +-|
|
||||||
|
| #### # |
|
||||||
|
| #### # |
|
||||||
|
| ##### # |
|
||||||
|
| #### # |
|
||||||
|
| #### # |
|
||||||
|
2 |-+ A #### # A +-|
|
||||||
|
| ## # |
|
||||||
|
| ## # |
|
||||||
|
| ## # |
|
||||||
|
| ## # |
|
||||||
|
| ## # |
|
||||||
|
1 |-+ ## # +-|
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| + + + + |
|
||||||
|
0 +-------------------------------------------------------------------------------------------+
|
||||||
|
aaa bbb ccc ddd
|
||||||
|
|
Loading…
Reference in New Issue
Block a user