I think this is an excellent idea, Eric.
I would love it if this feature would also work in contour.
The difficulty I see is that an axis needs to know whether an image or
contour plot has been added. If so, it needs access to the array with
the data to show the z value.
I am thinking out loud here.
So an axis needs an attribute 'showz' or something, that gets set, and
a pointer to the array needs to be set. What to do when you overlay
two contour plots? Not sure yet. Then the toolbar needs to be modified
to take that into account and call the appropriate function to display
the z value.
I think this would be a great feature.
Does anybody have suggestions for a clean implementation?
Date: Fri, 12 Jan 2007 14:13:50 +0100
From: Eric Emsellem <emsellem@...419...>
Subject: [Matplotlib-users] x=, y=, z=??
Content-Type: text/plain; charset=ISO-8859-1
I am coming back to an issue for which I didn't get a direct answer
(except for a very nice module from Angus McMorland!):
- at the moment different backends in mpl automatically provides, when
an image (or a plot) is displayed with e.g. imshow (plot), the
coordinates x and y directly in the toolbar.
- When it is indeed an image wich is displayed, it would, in my opinion
makes a LOT of sense to also display the "z" coordinate, namely the
'intensity' value of the pixel of the image on which the cursor is
The questions are then: does this also make sense to you, and if yes,
would it be possible for someone to implement it as an intrinsic feature
of mpl backends? (I am not competent to answer the feasibility part
here, although the module Angus nicely provided on the list is an
excellent example, even if it adds one more layer which may be avoidable).
thanks for any input here!