Plotting 3D surface from scatter points and a png on the same 3D graph

冷暖自知 提交于 2019-12-24 02:58:07

问题


I need to plot on the same graph a 3D surface based on a scatter points data and a 2D image (.png), positioned in a determined location on the graph to compare the data from both. So far I managed to do both separately (plotting the image and making the surface).

However, when I try to bring both together on the same script, I get an error message ("Gridding of the color Column is not implemented") which occurs due to the command that creates the surface (dgrid3d) that conflicts with the image. I want to know how can I avoid this error.

thanks in advance

*EDIT

The scatter points are on xyz format:

-100.000000 -25.000000 -4.122210

-100.000000 -20.000000 -4.933388

-100.000000 -15.000000 -7.902138

-100.000000 -10.000000 -7.902138

and the image is a plain png.

And the script I'm using is:

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

which doesnt work due to the error I pointed before


回答1:


The error message suggests that the problem is with dgrid3d. One way that you might be able to get around that is to plot the surface to a table:

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.


来源:https://stackoverflow.com/questions/14557828/plotting-3d-surface-from-scatter-points-and-a-png-on-the-same-3d-graph

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!