Jae-Joon Lee schrieb: > On Fri, Oct 9, 2009 at 10:55 AM, Georg Brandl <georg.bra...@frm2.tum.de> > wrote: >> Hi, >> >> I want to make a plot with ordinary subplots, each of which has a >> second axes set created with twinx(). Now, the second axes are >> always drawn over the first, but I want the "main" data, which is >> associated with the left Y axis, to be in front. (If I understand >> the code correctly, the zorder doesn't help here since it only >> applies to stuff within one axes set.) >> >> I've already tried reversing the order of the two axes in figure.axes, >> but that results in (apparently) only the first axes being drawn. >> Is there a way to get this working? > > Reordering the axes should work. The reason for only the first axes > being shown is that the frame (white background) of the main axes > blocks the content of the twin axes. > > Try something like below. > > > fig.axes = [ax2, ax1] # reorder > ax1.set_frame_on(False) > ax2.set_frame_on(True)
Yes, that works! Many thanks. BTW, from Gnuplot I missed the ability to press "q" to close a figure window and wrote a custom key handler to do that; would it make sense to add that by default? Georg ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users