2

我需要在同一张图上绘制基于散点数据和 2D 图像 (.png) 的 3D 表面,定位在图上的确定位置以比较两者的数据。到目前为止,我设法分别完成了这两项工作(绘制图像和制作表面)。

但是,当我尝试将两者放在同一个脚本上时,我收到一条错误消息(“未实现颜色列的网格化”),这是由于创建与图像冲突的表面 (dgrid3d) 的命令而发生的。我想知道如何避免这个错误。

提前致谢

*编辑

散点为 xyz 格式:

-100.000000 -25.000000 -4.122210

-100.000000 -20.000000 -4.933388

-100.000000 -15.000000 -7.902138

-100.000000 -10.000000 -7.902138

并且图像是普通的png。

我正在使用的脚本是:

set hidden3d
set samples 100
set isosamples 100
unset surface
set pm3d
set dgrid3d

 splot '444_0.dat' u 1:2:3 \
 splot 'test.png' \
 binary filetype=png flipy rotate=-90d center = (4,-25,5.7) perp=(0,1,0) with rgbimage

由于我之前指出的错误,这不起作用

4

1 回答 1

3

错误消息表明问题出在dgrid3d. 您可能能够解决的一种方法是将曲面绘制到表格中:

set terminal push #Save current terminal settings
set terminal unknown #dummy terminal
set table "surface.dat"
set dgrid3d
splot 'surface_points.dat' using ...
unset dgrid3d
unset table
set term pop #reset current terminal settings
set output "MyPlot.extension"

#commands to plot image and `surface.dat` together.
于 2013-01-28T13:30:48.250 回答