Displaying Gnuplot 3D-mesh cells value by placing the mouse cursor over it

175 Views Asked by At

I have been using Gnuplot to display 3D-mesh graphs (surface graphs) for a while. I am now striving to get Gnuplot 3D-mesh cell values displayed by placing the mouse cursor (pointer) over it. I have seen the cell fourth dimension (color intensity value) can get displayed. Could anybody help?

This is my GNUPLOT code

set cbrange [0.0:.2]
set palette defined (0 'white', 1 'midnight-blue')
set pm3d
set contour surface
set cntrparam levels incremental 0, 50, 1000
set xrange [0:1300]
set yrange [0:1500]
set zrange [0:1000]
set xyplane at 0
set view 9, 88, 2.3
set view equal xy

splot '-' using 1:2:3:4 notitle with lines lw .3 lc rgb 'black'

I appreciate your comments

Javero

1

There are 1 best solutions below

4
theozh On

Probably you are looking for something like this? The points for hypertext anchor are made with pointsize 2 (for easy capture) and fully transparent, i.e. invisible (whatever) color 0xff...... (scheme 0xaarrggbb).

Check help hypertext.

Script:

### show hypertext in 3D
reset session

# create some test data
set samples 16
set isosamples 16
set table $Data
    f(x,y)=(sin(1.3*x)*cos(.9*y)+cos(.8*x)*sin(1.9*y)+cos(y*.2*x))+3
    splot '++' u 1:2:(f($1,$2))
unset table

set palette defined (0 'white', 1 'midnight-blue')
set pm3d hidden noborder depthorder
set xyplane relative 0
set key noautotitle

splot $Data u 1:2:3 w pm3d, \
         '' u 1:2:3:(sprintf("%.2f",$3)) w labels hypertext \
            point pt 7 ps 2 lc rgb 0xff123456
### end of code

Result: (screen capture from wxt terminal)

enter image description here