Reputation: 417
I'm doing a 3d plot of values, and comparing them all against one single point. I'd like to have this single point clearly labelled in the graphs. Everything I've tried creates a plane that intersects this point due to dgrid3d I believe.
I think I can do this by overlapping two plots, but I feel like there must be an easier way.
Here is my script:
reset
set dgrid3d 10,10,10
set hidden3d
unset key
set xrange [0:550]
set yrange [0:550]
splot 'CAPS_data.dat' using 2:1:3 with linespoints
Upvotes: 1
Views: 989
Reputation: 309929
If you're comparing with only a few static points, you can add points via a labels:
set label 1 "" at X,Y,Z point
Otherwise, as you state, dgrid3d
will turn that single point into a surface. The workaround for this sort of thing is to use a table
and the plot your dgrid3d surface into the table. Then you can turn dgrid3d off and plot the surface with a different plotting style (e.g. pm3d
).
set table "grid_data.dat"
set dgrid3d 100,100
splot "datafile.dat" u 1:2:3
unset table
unset dgrid3d
set term <whatever>
set output <whatever>
splot 'grid_data.dat' u 1:2:3 w pm3d,\
'point_data.dat' u 1:2:3 w points
Upvotes: 2