我在使用gnuplot绘制.eps图像时,发现图像没有颜色。

3
我想使用gnuplot绘制一些曲线。最近我更换了电脑,现在我有一个MacOSX 10.9.5系统。在我的旧电脑上,我的.eps图中出现了颜色,但是在我的Mac上不再出现,并且会出现错误消息:"Times not found, using Courier." 我认为这是另一个问题。我的gnuplot版本是Version 5.0 patchlevel 0。
以下是我用gnuplot加载的trace.p文件: $ gnuplot
gnuplot > load "trace.p"
set autoscale
unset logscale
unset label
set term postscript enhanced 'Times'
set output"E_Hxc_bath_exact_weak.eps"
set title "E^{bath,exact}_{Hxc}/U, E^{bath,weak}_{Hxc}/U functions of U/t with potential more or equal to second-order set to 0"
set xlabel "U/t"
set ylabel "E^{bath}_{Hxc}/U"
set xrange [0.7:10]
set yrange [-7:10]
set key left top
set style line 1 lt 1 lc rgb "red" lw 3
set style line 2 lt 2 lc rgb "red" lw 3
set style line 3 lt 3 lc rgb "red" lw 3
set style line 4 lt 1 lc rgb "green" lw 3
set style line 5 lt 2 lc rgb "green" lw 3
set style line 6 lt 3 lc rgb "green" lw 3
set style line 7 lt 1 lc rgb "black" lw 3
set style line 8 lt 2 lc rgb "black" lw 3
set style line 9 lt 1 lc rgb "blue" lw 3
set style line 10 lt 2 lc rgb "blue" lw 3
set style line 11 lt 3 lc rgb "blue" lw 3
set style line 12 lt 1 lc rgb "violet" lw 3
set style line 13 lt 2 lc rgb "violet" lw 3

plot (0.25 - (3/4)/(sqrt(1+64/(x**2)) + 2*sqrt(1+16/(x**2)))) with lines ls 7 title "exact", (0.25 - 3*(x**2)/64 + (x**3)/(2*16*16)) with lines ls 1 title "weak";

有些行代码似乎没有用处,但我不知道为什么结果是无色的,可能是我漏了某个应用程序或其他东西...

2个回答

7
尝试在脚本的set term 行中添加color标志。

确实,就是这么简单...谢谢! - B_runo

1

对于没有出现的虚线,这是因为在5.0版本中,命令发生了变化,不再使用“linetype”而是“dashtype”。

更多详细信息请参见Gnuplot线型的响应。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接