gnuplot:用一种颜色绘制的 3d 图表,但具有阴影效果(与通常的 3d 模型一样)

gnuplot: 3d chart painted in one color, but with shading effect (as usual 3d model)

你能告诉我们如何用一种颜色绘制 3d 图表,但有阴影效果吗?

使用任何 pm3d 根据 z 的值给出颜色,我不需要,实际上(视觉上)不会给出阴影

我希望看到绘制的图表作为通常的 3d 模型(像通常的 3d 编辑器一样)

现在我正在使用一个我不满意的选项:

    set hidden3d
    set pm3d
    set palette rgbformulae 22,13,-31

    splot inputFullPath using 2:1:4 with pm3d notitle

而且我想看这种 3d 图表:

在 gnuplot 5.2 版中引入了一个带有镜面高光的简单 3D 光照模型。参见 help lighting。这是文档中的一段和在线演示集的 link。

gnuplot> help lighting

 By default the colors assigned to pm3d objects are not dependent on orientation
 or viewing angle. This state corresponds to `set pm3d nolighting`.
 The command `set pm3d lighting` selects a simple lighting model consisting of a
 single fixed source of illumination contributing 50% of the overall lighting.
 The strength of this light relative to the ambient illumination can be adjusted
 by `set pm3d lighting primary <fraction>`.  Inclusion of specular highlighting
 can be adjusted by setting a fractional contribution:
      set pm3d lighting primary 0.50 specular 0.0   # no highlights
      set pm3d lighting primary 0.50 specular 0.6   # strong highlights

link to lighting demo from online collection