Ishida
Ishida

Reputation: 277

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

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

Upvotes: 2

Views: 4480

Answers (1)

mgilson
mgilson

Reputation: 309831

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.

Upvotes: 3

Related Questions