我正在使用gnuplot中的直方图,我想将其中一个直方图条放在其他结果后面。我希望参考条(Mörk spennubjögunar > 200 kV)位于其他直方图条的后面。在使用不同的y轴之前,我已经在excel中做到了这一点,有没有在gnuplot中做到这一点的好方法?

这是我目前正在使用的代码。
set terminal pngcairo transparent nocrop enhanced size 3200,2400 font "arial,40"
set output "Harmonic_currents_BRE.png"
set key right
set datafile separator ";"
set style line 12 lc rgb '#808080' lt 0 lw 1
set style line 13 lt 0 lw 3
set grid back ls 12
set xrange [-1:20]
set yrange [0:8]
set style data histogram
set style histogram cluster gap 1
set style fill solid border 0
set border lw 2
set boxwidth 0.7
set ylabel "Hlutfall af nafnspennu [%]"
set xlabel "Tíðni [pu 50 Hz base]"
plot "case0.csv" using 2:xticlabels(1) title 'Tilfelli 0',\
"case1.csv" using 2:xticlabels(1) title 'Tilfelli 1',\
"case2.csv" using 2:xticlabels(1) title 'Tilfelli 2',\
"case3.csv" using 2:xticlabels(1) title 'Tilfelli 3',\
"ref.csv" using 2:xticlabels(1) title 'Mörk spennubjögunar > 200 kV'
unset output
unset zeroaxis
unset terminal发布于 2016-07-19 03:01:13
我认为,最好的方法是首先用固定的框宽绘制引用with boxes (我使用的是0.9),然后绘制聚类直方图:
set style data histogram
set style histogram cluster gap 1
set style fill solid noborder
set boxwidth 0.7
plot "ref.csv" using 0:2:(0.9):xtic(1) with boxes title 'Mörk spennubjögunar > 200 kV',\
for [i=0:3] sprintf("case%d.csv", i) u 2 title sprintf('Tilfelli %d), i)https://stackoverflow.com/questions/38441729
复制相似问题