0
tmp.data
DATE D0 D1 D2 D3 D4 D5
"2017-07-19" 10 8 6 4 2 1
"2017-07-20" 16 14 10 11 10 9
"2017-07-21" 6 5 4 4 3 1
"2017-07-22" 7 5 4 4 3 2
"2017-07-23" 8 6 4 2 1 1
tmp.gnu
set terminal png size
set output 'output.png'
set title "statistics"
set key font ",10"
D0 = "#99ffff"; D1 = "#4671d5"; D2 = "#ff0000"; D3 = "#f36e00"; D4 = "#8A2BE2#'; D5 = "#4671d5"
set auto x
unset xtics
set xtics nomirror rotate by -45 scale 0
set style data histogram
set style histogram rowstacked
set style fill solid border -1
set boxwidth 0.75
plot 'tmp.data' u 2:xtic(1) title columnheader, \
'' u 3:xtic(1) title columnheader, \
'' u 4:xtic(1) title columnheader, \
'' u 5:xtic(1) title columnheader, \
'' u 6:xtic(1) title columnheader, \
'' u 7:xtic(1) title columnheader
创建以下: gnuplot的堆积条形图算术
的列是累计。 我想什么有是有它的比例,例如在第2行
10 - 8 = 2,
8 - 6 = 2,
6 - 4 = 2,
4 - 2 = 2,
2 - 1 = 1
而第二列中的值应该如数据文件中给出的那样? – Christoph
其他列正在成正比 – 2fishandchips
我在询问_columns_。你的例子显示,而不是第3列,你想要第3列和第2列之间的差异。这可以通过使用($ 2 - $ 3):xtic(1)',并相应地与第4列和更大。但对于第2栏没有参考价值。所以应该省略,还是将其用于数据文件中? – Christoph