这里给出了一些默认的其它参数。gnuplot下的每一个 terminal 所带的参数不完全相同,一些参数只针对某一 terminal。我们只需要知道一些常用 terminal 的常用参数,而其它的 terminal 和参数,我们可以在使用的时候通过 help 命令查询。现在我们暂且不管这些参数,先画一个图试试。还是用我们上次用过的降水量数据文件: gnuplot> set xlabel "Month" gnuplot> set ylabel "Precipitation (mm)" gnuplot> set xrange [0.5:12.5] gnuplot> set xtics 1,1,12 gnuplot> set output "precipitation.eps" gnuplot> plot "precipitation.dat" using 1:2 w lp pt 5 title "Beijing", "precipitation.dat" using 1:3 w lp pt 7 title "Shanghai" gnuplot> set output gnuplot> set term wxt
我们来重新画一下这个图: gnuplot> set terminal postscript eps color solid linewidth 2 "Helvetica" 20 gnuplot> set output "precipitation-color.eps" gnuplot> replot gnuplot> set output gnuplot> set term wxt 这里我们用 color 参数表示我们要彩色图,solid 表示我们要实线不要虚线,linewidth 参数指定2倍线宽,而最后指定使用 Helvetica 20 号字体。让我们来看看新生成的 eps 文件:
这里的字体为 postscript level 2字体,共有35种。除了 Helvetica,常用的还有 Times-Roman。如果硬要多记两个字体名字,就记住 Courier 和 Symbol 吧。Courier 是编程时常用的等宽字体,而 Symbol 字体可以用来显示希腊字母。如果你实在好奇还有哪些其它字体,可以看看下面的网页链接: http://xfig.org/userman/attributes.html#font-panel