水平键在GNUPLOT中以垂直显示 [英] The horizontal key displays in vertical in GNUPLOT
本文介绍了水平键在GNUPLOT中以垂直显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在gnuplot
中,我使用了水平键,但是在输出屏幕上却显示了垂直.我尝试了所有替代方法,但发现很难做到这一点.
In gnuplot
, I used the horizontal key, but it shows me vertical on the output screen. I tried every alternative but found difficult to do that.
set terminal wxt size 600,600 enhanced font 'times new roman,10' persist
set xlabel "X-Axis"
set ylabel "Y-Axis"
set multiplot layout 2,3
set key box
set key horiz
set key at screen 0.5, 0.40
set title "1st"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
set title "2nd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
set title "3rd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
unset multiplot
是否有其他选择?单击下面的输出,查看该图:
Is there any alternative possible?? See the plot by click on the output below:
推荐答案
您可以通过指定set key vertical maxrows 1
来强制图例由单行组成:
You can force the legend to consist of a single row by specifying set key vertical maxrows 1
:
set xlabel "X-Axis"
set ylabel "Y-Axis"
set multiplot layout 2,3
set key at screen 0.5, 0.40 center vertical height 1 box maxrows 1
set title "1st"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
set title "2nd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
set title "3rd"
set xrange [0:20]
plot tan((pi/180)*x) title "Analytical" w l ls 1,\
tan(2*(pi/180)*x) title "Observed" w lp ls 2,\
tan(3*(pi/180)*x) title "Experimental" w lp ls 3
unset multiplot
这篇关于水平键在GNUPLOT中以垂直显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文