我想在 gnuplot 中对类似于此图像的直方图 rowstacked 进行分组:
![Example of an histogram](https://i.stack.imgur.com/aXqbK.png)
我有这两个文件,其中直方图的数据来自:
#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
#Min-makespan
Input West-Virginia ChicagoI ChicagoII California
1500 34 20 30 17
3000 33 30 21 16
4500 31 23 38 9
6000 42 21 38 0
plot for [i=2:5] 'cloudusage-roundrobin.dat' using i:xtic(1), \
for [i=2:5] 'cloudusage-minmakespan.dat' using i:xtic(1)
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 的结果:
![enter image description here](https://i.stack.imgur.com/eKql3.png)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)