使用Multiplot设置GNUPLOT的线样式
我准备了以下脚本来绘制多个图。如脚本所示,我预先定义了线样式。结果图中的线属性 不是像它们在脚本中定义的那样,而且我无法控制脚本的线宽和点大小。关于导致问题的什么建议?
set terminal epslatex size 15cm, 15cm
set output "Figure1.tex"
set size 1.0,1.0
set origin 0.0,0.0
set xrange [0.1:0.8]
set xtics 0.1,0.2,0.9
set logscale y
set multiplot layout 2,2
set linestyle 1 linecolor rgb 'red' pointtype 1 pointsize 2 linewidth 5
set linestyle 2 linecolor rgb 'green' pointtype 2 pointsize 3 linewidth 5
set linestyle 3 linecolor rgb 'blue' pointtype 3 pointsize 3 linewidth 5
set linestyle 4 linecolor rgb 'yellow' pointtype 4 pointsize 3 linewidth 5
set linestyle 5 linecolor rgb 'magenta' pointtype 5 pointsize 3 linewidth 5
set linestyle 6 linecolor rgb 'web-blue' pointtype 6 pointsize 3 linewidth 5
set linestyle 7 linecolor rgb 'black' pointtype 7 pointsize 3 linewidth 5
unset key
set yrange [2.8:6]
set ytics add ("3" 3.0, "6" 6.0 )
set lmargin 0
plot " file1.txt" using 1:2 with linespoint ls 1, "file2.txt" using 1:2
with linespoint lt 2,\
"file3.txt" using 1:2 with linespoint lt 3,"file4.txt" using 1:2 with
linespoint lt 4,\
"file5.txt" using 1:2 with linespoint lt 5,\
"file6.txt" using 1:2 with linespoint lt 6,\
"file7.txt" using 1:2 with linespoint lt 7
unset lmargin
set yrange[1.2:2.5]
set ytics add ( "1.5" 1.5,"2.5" 2.5 )
unset ylabel
set rmargin 0
plot " file1.txt" using 1:3 with linespoint ls 1, "file2.txt" using 1:3
with linespoint lt 2,\
"file3.txt" using 1:3 with linespoint lt 3,"file4.txt" using 1:3 with
linespoint lt 4,\
"file5.txt" using 1:3 with linespoint lt 5,\
"file6.txt" using 1:3 with linespoint lt 6,\
"file7.txt" using 1:23 with linespoint lt 7
unset margin
set yrange[0.1:5.0]
set ytics add ("" 1.0, "" 1.5, "" 2.5,"3" 3.0)
set lmargin 0
plot " file1.txt" using 1:4 with linespoint ls 1, "file2.txt" using
1:4
with linespoint lt 2,\
"file3.txt" using 1:3 with linespoint lt 3,"file4.txt" using 1:4 with
linespoint
lt 4,\
"file5.txt" using 1:4 with linespoint lt 5,\
"file6.txt" using 1:4 with linespoint lt 6,\
"file7.txt" using 1:4 with linespoint lt 7
unset lmargin
set yrange[0.1:5.0]
unset ylabel
set key at 0.7,3.7 maxrows 4 Left reverse
set rmargin 0
plot "file1.txt" using 1:5 title '{Ou}' with linespoint ls 1, "file2.txt" using 1:5 title
'{L}' with linespoint lt 2,\
"file3.txt" using 1:5 title '{SL}' with linespoint lt 3,"file4.txt" using 1:5 title '{CC}'
with linespoint lt 4,\
"file5.txt" using 1:5 title '{HL}' with linespoint lt 5,\
"file6.txt" using 1:5 title '{HS}' with linespoint lt 6,\
"file7.txt" using 1:5 title '{SPi}' with linespoint lt 7
unset margin
unset multiplot
set output
set terminal pop
我得到的数字是以下在此处输入图像描述。
I prepared the following script to plot multiple plots. I predefined my line styles, as shown in the script. The line properties in the resulted figure
are not as they are defined in the script, plus I can not control the linewidths and the point sizes from the script. Any suggestions on what is causing the problem?
set terminal epslatex size 15cm, 15cm
set output "Figure1.tex"
set size 1.0,1.0
set origin 0.0,0.0
set xrange [0.1:0.8]
set xtics 0.1,0.2,0.9
set logscale y
set multiplot layout 2,2
set linestyle 1 linecolor rgb 'red' pointtype 1 pointsize 2 linewidth 5
set linestyle 2 linecolor rgb 'green' pointtype 2 pointsize 3 linewidth 5
set linestyle 3 linecolor rgb 'blue' pointtype 3 pointsize 3 linewidth 5
set linestyle 4 linecolor rgb 'yellow' pointtype 4 pointsize 3 linewidth 5
set linestyle 5 linecolor rgb 'magenta' pointtype 5 pointsize 3 linewidth 5
set linestyle 6 linecolor rgb 'web-blue' pointtype 6 pointsize 3 linewidth 5
set linestyle 7 linecolor rgb 'black' pointtype 7 pointsize 3 linewidth 5
unset key
set yrange [2.8:6]
set ytics add ("3" 3.0, "6" 6.0 )
set lmargin 0
plot " file1.txt" using 1:2 with linespoint ls 1, "file2.txt" using 1:2
with linespoint lt 2,\
"file3.txt" using 1:2 with linespoint lt 3,"file4.txt" using 1:2 with
linespoint lt 4,\
"file5.txt" using 1:2 with linespoint lt 5,\
"file6.txt" using 1:2 with linespoint lt 6,\
"file7.txt" using 1:2 with linespoint lt 7
unset lmargin
set yrange[1.2:2.5]
set ytics add ( "1.5" 1.5,"2.5" 2.5 )
unset ylabel
set rmargin 0
plot " file1.txt" using 1:3 with linespoint ls 1, "file2.txt" using 1:3
with linespoint lt 2,\
"file3.txt" using 1:3 with linespoint lt 3,"file4.txt" using 1:3 with
linespoint lt 4,\
"file5.txt" using 1:3 with linespoint lt 5,\
"file6.txt" using 1:3 with linespoint lt 6,\
"file7.txt" using 1:23 with linespoint lt 7
unset margin
set yrange[0.1:5.0]
set ytics add ("" 1.0, "" 1.5, "" 2.5,"3" 3.0)
set lmargin 0
plot " file1.txt" using 1:4 with linespoint ls 1, "file2.txt" using
1:4
with linespoint lt 2,\
"file3.txt" using 1:3 with linespoint lt 3,"file4.txt" using 1:4 with
linespoint
lt 4,\
"file5.txt" using 1:4 with linespoint lt 5,\
"file6.txt" using 1:4 with linespoint lt 6,\
"file7.txt" using 1:4 with linespoint lt 7
unset lmargin
set yrange[0.1:5.0]
unset ylabel
set key at 0.7,3.7 maxrows 4 Left reverse
set rmargin 0
plot "file1.txt" using 1:5 title '{Ou}' with linespoint ls 1, "file2.txt" using 1:5 title
'{L}' with linespoint lt 2,\
"file3.txt" using 1:5 title '{SL}' with linespoint lt 3,"file4.txt" using 1:5 title '{CC}'
with linespoint lt 4,\
"file5.txt" using 1:5 title '{HL}' with linespoint lt 5,\
"file6.txt" using 1:5 title '{HS}' with linespoint lt 6,\
"file7.txt" using 1:5 title '{SPi}' with linespoint lt 7
unset margin
unset multiplot
set output
set terminal pop
The figure I got is the following enter image description here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论