本文介绍了在gnuplot中,图例的字母和行未对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是gnuplot的新手.图例的字母和行在gnuplot的输出图中未对齐.
I am new to gnuplot.The letters and lines of the legend are misaligned in my output figure of gnuplot.
我使用了下面的代码.
I used the code below.
gnuplot -persist <<EOF
set size ratio 3/4
set tics font "Arial, 15"
set xrange [494:506]
set yrange [0:1]
set xlabel 'wavelenth [nm]' font "Arial, 20"
set ylabel 'probability' font "Arial, 20" offset -2,0
set lmargin 10
set bmargin 6
set rmargin 25
set key font "Arial, 15" outside spacing 1.5
plot 'result.out' using 1:2 with lines title "transmittance"
replot 'result.out' using 1:3 with lines title "reflectance" lc rgb "dark- green"
replot 'result.out' using 1:4 with lines title "absorbance"
set terminal png
set output 'out.png'
replot
EOF
推荐答案
如果您指的是垂直对齐方式,则可以使用set terminal pngcairo
而不是set terminal png
If you mean vertical alignment, it can be fixed using set terminal pngcairo
instead of set terminal png
可以在图例选项中更改水平对齐方式,例如set key font "Arial, 15" outside spacing 1.5 Left
Horizontal alignment can be changed in legend options, e.g. set key font "Arial, 15" outside spacing 1.5 Left
这篇关于在gnuplot中,图例的字母和行未对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!