gnuplot中Nelder-Mead算法的可视化

时间:2010-03-27 10:24:00

标签: visualization gnuplot

有没有人知道如何在某些3d函数的水平集上实现绘制三角形(类似于gnuplot中的这个image?当我在阅读一些教程后尝试这样做时:

gnuplot> set border 15 front linetype -1 linewidth 1.000
gnuplot> set logscale z 10
gnuplot> set view map
gnuplot> set isosamples 60, 60
gnuplot> unset surface
gnuplot> set contour base
gnuplot> unset clabel
gnuplot> set style data lines
gnuplot> set ticslevel 0
gnuplot> set noztics
gnuplot> set title "Trwa symulacja"
gnuplot> set xlabel "x"
gnuplot> set xrange [ * : * ] noreverse nowriteback
gnuplot> set ylabel "y"
gnuplot> set zlabel ""
gnuplot> set yrange [ * : * ] noreverse nowriteback
gnuplot> set zrange [ * : * ] noreverse nowriteback
gnuplot> splot [-10.5:10.5] [-10.5:10.5] x**2 +y**2 with lines lc rgb "#000000"
notitle,\
>'-' with lines notitle
input data ('e' ends) > 5.39703780733842 0.424994542694183 29.3086374551602
input data ('e' ends) > -4.80045950473308 -8.66307635892326 98.0933034571172
input data ('e' ends) > -3.56740563691939 3.31903046267993 23.7423461905216
input data ('e' ends) > 5.39703780733842 0.424994542694183 29.3086374551602
input data ('e' ends) > e

但我仍然收到警告:“无法对非网格数据进行轮廓处理。请使用”set dgrid3d“。”。

1 个答案:

答案 0 :(得分:1)

您需要为整个surface启用splot,并为您不想要的部分关闭它。 (你不能反过来做; splot语法只允许抑制曲面而不是重新启用它们。)

# All the other settings you were using...
set surface
splot [-10.5:10.5] [-10.5:10.5] \
      x**2 +y**2 with lines lc rgb "#000000" notitle nosurface, \
      '-' with lines notitle
5.39703780733842 0.424994542694183 29.3086374551602
-4.80045950473308 -8.66307635892326 98.0933034571172
-3.56740563691939 3.31903046267993 23.7423461905216
5.39703780733842 0.424994542694183 29.3086374551602
e