In gnuplot, the letters and lines of the legend are misaligned

故事扮演 提交于 2019-12-24 20:10:42

问题


Dear stack overflow users, I am new to gnuplot. The letters and lines of the legend are misalinged in my output figure of gnuplot.

I used the code below.

Please help me...

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

回答1:


If you mean vertical alignment, it can be fixed using set terminal pngcairo instead of set terminal png

Horizontal alignment can be changed in legend options, e.g. set key font "Arial, 15" outside spacing 1.5 Left



来源:https://stackoverflow.com/questions/51906834/in-gnuplot-the-letters-and-lines-of-the-legend-are-misaligned

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!