In the following example the coordinates of the mouse
cursor displayed in the pylab window belong to the
second y-axis. But I would prefer to have the coordinates
of the first y-axis to be displayed. Is this possible?
yes it is.
import pylab as mpl
# get the current figure
f = mpl.gcf()
# Hide the "background" for the first axes, otherwise it will block
the second one when we swap
# Swap the axes
# Turn on the "background" for the *new* first axes (the one that was
you can also achieve the same effect by changing the zorder of axes -
provided that you remember to have turn the frame on for the one that
is the furthest back, and turn it off for all others lying on top of
it. You can see what happens if you don't do this by omitting the
calls to set_frame_on, and then verifying that the second line does
not show up (because the original axes' frame patch is blocking it.
On Fri, Sep 23, 2011 at 2:08 PM, Andreas Matthias <andreas.matthias@...287...> wrote:
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7