Maxima:二维标量场 f(x,y) 的颜色图(又名 "bird's view")
Maxima: Colorplot of 2D scalar field f(x,y) (aka "bird's view")
在 maxima 中,调用 plot3d()
函数时的默认行为是从侧面透视生成的流形。例如,运行
(%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi]);
产量
这样的图可能非常漂亮,但往往会使我们对它的解释产生偏差,而且有时流形的某些部分会被隐藏。我如何获得同一地块的 "bird's view"?
这可以通过在绘制绘图之前要求 Maxima 使用 运行 gnuplot 的 set view map
命令来实现。的确,调用
(%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi], [gnuplot_preamble, "set view map"]);
产量
彩色图的替代方法是等高线图。例如,
(%i1) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi], [gnuplot_preamble,
"set view map; set size square;unset surface;set contour;set cntrparam levels 10;set clabel '%.1f';set isosamples 150"])
产量
这些参数是 "Gnuplot in Action" 书第 145 页清单 8.1 推荐的参数。这是对每个功能的描述(来自同一个列表):
set view map #Choose birds-eye view
set size square #Choose equal units in both directions
unset surface #Switch off the surface...
set contour #... but switch on contours lines
set cntrparam levels 10 #Increase the number of contour lines
set clabel "%.1f" #Choose format of contour labels in key
set isosamples 150 #Increase sampling frequency
在 maxima 中,调用 plot3d()
函数时的默认行为是从侧面透视生成的流形。例如,运行
(%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi]);
产量
这样的图可能非常漂亮,但往往会使我们对它的解释产生偏差,而且有时流形的某些部分会被隐藏。我如何获得同一地块的 "bird's view"?
这可以通过在绘制绘图之前要求 Maxima 使用 运行 gnuplot 的 set view map
命令来实现。的确,调用
(%i0) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi], [gnuplot_preamble, "set view map"]);
产量
彩色图的替代方法是等高线图。例如,
(%i1) wxplot3d(cos(x)*cos(y),[x,-%pi,%pi],[y,-%pi,%pi], [gnuplot_preamble,
"set view map; set size square;unset surface;set contour;set cntrparam levels 10;set clabel '%.1f';set isosamples 150"])
产量
这些参数是 "Gnuplot in Action" 书第 145 页清单 8.1 推荐的参数。这是对每个功能的描述(来自同一个列表):
set view map #Choose birds-eye view
set size square #Choose equal units in both directions
unset surface #Switch off the surface...
set contour #... but switch on contours lines
set cntrparam levels 10 #Increase the number of contour lines
set clabel "%.1f" #Choose format of contour labels in key
set isosamples 150 #Increase sampling frequency