#58 z value


with mouse on, in map view 3d plot shows the value of x
and y position of the mouse.
Is it possible to have also the z value? or at least
the nearest point?

maybe with a command that can be binded



  • Ethan Merritt

    Ethan Merritt - 2004-03-21

    Logged In: YES

    It is not possible for gnuplot to do this by itself, because
    it would not know what z value to print. What if you have
    more than one function plotted? What if the function is
    only defined at certain points?

    But if you, yourself, know how to calculate a z value from
    any given (x,y) pair then you could trigger it on a mouse click:

    splot {whatever}
    pause mouse
    result = f(MOUSE_X,MOUSE_Y)
    print "X Y Z =", MOUSE_X, MOUSE_Y, result

    Binding it to a key would not work, because you need a mouse
    click to load the x and y values. That could be changed in
    the future, possibly, if you can provide an example of a
    specific case in which it would be useful.

  • Petr Mikulik

    Petr Mikulik - 2004-03-26
    • assigned_to: nobody --> mikulik
  • Petr Mikulik

    Petr Mikulik - 2004-03-26

    Logged In: YES

    I think this feature should not be difficult to implement.
    It would return the z value for the first surface, if
    multiple are plotted.
    This would be useful for 2D graphs too, getting the nearest
    If you have some free time, please try to contribute an


Log in to post a comment.