编辑:响应 OP 的顶部编辑,使其更容易找到:
有多种方法可以使 gnuplot 直接渲染到文件(向下滚动到“终端”),然后您可以读入该文件进行分析。例如,您可以输出为易于读写的便携式位图格式(如果不是小而优雅的话)。请注意,根据定义,PBM 将为您提供一系列黑色和白色。
例如,查看使用“set terminal”和“set output”命令渲染到一系列 Unix 管道的用法,这些管道生成 pbm 和 png 文件。
结束编辑:
Gnu Octave 默认使用 gnuplot 进行绘图,而 gnuplot 在生成填充多边形方面非常擅长。这里有一些关于这类事情的有用演示。例如,这里有一些填充多边形:
# set terminal png transparent nocrop enhanced font arial 8 size 420,320
# set output 'fillcrvs.4.png'
set grid nopolar
set grid xtics nomxtics ytics nomytics noztics nomztics \
nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set grid front linetype 0 linewidth 1.000, linetype 0 linewidth 1.000
set key outside right top vertical Right noreverse enhanced autotitles nobox
set title "The red bat: abs(x) with filledcurve xy=2,5"
plot abs(x) with filledcurve xy=2,5
这是另一个在填充曲线页面底部绘制疯狂面孔的演示脚本:
# set terminal png transparent nocrop enhanced font arial 8 size 420,320
# set output 'fillcrvs.6.png'
unset border
set dummy t,y
set grid nopolar
set grid xtics nomxtics ytics nomytics noztics nomztics \
nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000
unset key
set label 1 "gnuplot" at 0, 1.2, 0 centre norotate front nopoint offset character 0, 0, 0
set label 2 "gnuplot" at 0.02, -0.6, 0 centre norotate front nopoint offset character 0, 0, 0
set arrow 1 from -0.1, 0.26, 0 to 0.18, -0.17, 0 head front nofilled linetype 5 linewidth 4.000 size first 0.100,40.000,90.000
set parametric
set size ratio 1 1,1
set noxtics
set noytics
set title "Let's smile with parametric filled curves"
set xrange [ -1.00000 : 1.00000 ] noreverse nowriteback
set yrange [ -1.00000 : 1.60000 ] noreverse nowriteback
plot [t=-pi:pi] sin(t),cos(t) with filledcurve xy=0,0 lt 15, sin(t)/8-0.5,cos(t)/8+0.4 with filledcurve lt 3, sin(t)/8+0.5,cos(t)/8+0.4 with filledcurve lt 3, t/5,abs(t/5)-0.8 with filledcurve xy=0.1,-0.5 lt 1, t/3,1.52-abs(t/pi) with filledcurve xy=0,1.8 lt -1