谈谈著名的gnuplot:), briefly I 设置

By xil41

大概是linux下最著名的画图程序了. The most important: it’s free. 最新的版本是4.0.

Fortran下面调用gnuplot使用call system”gnuplot filename” 即可; C下, 网上free code下载.
现谈谈设置.gnuplot所有设置都应在作图之前进行, 包括设置输出文件名. 在command line下键入gnuplot,进入程序:

gnuplot

4.0大概提供60多种图形文件输出形式(terminal type), 包括.gif, .png, .jpeg 以及.ps. 键入set term 会显示所安装的版本提供的所有文件格式(press “q”键退出显示). 用set term <filetype>来设置输出文件形式. :

set term

然后用set output “filename” 选择输出文件名.

结束对文件格式的操作, 然后就进行图形的设置, 一般常用有set xrange[xmin:xmax], set xtics <#>(divide x interval with increment #), set mxtics <#> (draw small tics inside the interval), set xlabels “xlabel” (insert x name)以及对应的y轴操作.接着还有set grid(画网格)等等.全部的set命令可以用help set来查看:

set pic

Leave a Reply