【问题标题】:Put histogram side-by-side并排放置直方图
【发布时间】:2014-05-01 10:50:59
【问题描述】:

我想在 gnuplot 中对类似于此图像的直方图行分组:

我有这 2 个文件,其中直方图的数据来自:

#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 标签?

【问题讨论】:

    标签: gnuplot histogram


    【解决方案1】:

    您必须使用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 的结果:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-07
      • 2011-09-22
      • 1970-01-01
      • 2014-09-10
      • 2023-03-13
      • 2017-10-31
      相关资源
      最近更新 更多