Gnuplot 并排放置直方图
我想在gnuplot中将一个直方图行进行分组,类似于下图: 我有两个文件,其中直方图中的数据来自:Gnuplot 并排放置直方图,gnuplot,histogram,Gnuplot,Histogram,我想在gnuplot中将一个直方图行进行分组,类似于下图: 我有两个文件,其中直方图中的数据来自: #Round-robin Input West-Virginia ChicagoI ChicagoII California 1500 28 25 28 19 3000 30 24 25 21 4500
#Round-robin
Input West-Virginia ChicagoI ChicagoII California
1500 28 25 28 19
3000 30 24 25 21
4500 28 28 25 19
6000 34 25 23 18
1-我的绘图指令将两个直方图堆叠起来,而不是将它们并排放置。我如何将它们并排放置,以及与2个xx标签一起放置?您必须使用
newhistogram
来启动新的直方图。要使用相同的线型,必须再次调用newhistogram
选项lt 1
:
reset
set style data histogram
set style histogram rowstacked title offset 0,-1
set bmargin 4
set boxwidth 0.9
set style fill solid border lt -1
set key autotitle columnheader horizontal
plot newhistogram 'Cluster 1', \
for [i=2:5] 'cloudusage-roundrobin.dat' using i:xtic(1),\
newhistogram 'Cluster 2' lt 1, \
for [i=2:5] 'cloudusage-minmakespan.dat' using i:xtic(1) notitle
结果见4.6.4:
plot for [i=2:5] 'cloudusage-roundrobin.dat' using i:xtic(1), \
for [i=2:5] 'cloudusage-minmakespan.dat' using i:xtic(1)
reset
set style data histogram
set style histogram rowstacked title offset 0,-1
set bmargin 4
set boxwidth 0.9
set style fill solid border lt -1
set key autotitle columnheader horizontal
plot newhistogram 'Cluster 1', \
for [i=2:5] 'cloudusage-roundrobin.dat' using i:xtic(1),\
newhistogram 'Cluster 2' lt 1, \
for [i=2:5] 'cloudusage-minmakespan.dat' using i:xtic(1) notitle