Gino
Gino

Reputation: 43

Can hypertext be used with pm3d surface plot in Gnuplot?

I am trying to read coordinates of various points of the 3D surface (heatmap) created with pm3d. If I plot just the points in the 3D space with splot command, I can use hypertext to display their X, Y, Z coordinates interactively. But when I use pm3d command, hypertext seems not working. Is it possible to use simultaneously hypertext and pm3d?

Upvotes: 1

Views: 90

Answers (1)

Ethan
Ethan

Reputation: 15093

Does this work for you?

f(a,b) = sin(a)*cos(b)
set xrange [-pi:pi]; set yrange [-pi:pi]
set samples 21; set isosamples 21

set pm3d 
set pm3d depthorder
splot '++' using 1:2:(f($1,$2)):(sprintf("%.2g %.2g %.2g",$1,$2,f($1,$2))) \
      with labels point lc "#FF000000" hypertext

That should give you a pm3d surface with hypertext labels at each vertex. The point lc "#FF000000" is to make the points transparent so they don't interfere with viewing the surface.

Upvotes: 1

Related Questions