|
From: Paul I. <piv...@gm...> - 2011-02-25 23:59:17
|
Jeff Kowalczyk, on 2011-02-25 23:20, wrote: > I am trying to plot multiple series on one axes and a bar chart on a shared x, > new y axes. I'm using twinx. The following test code works, but I need to render > the bar plot *behind* the line plots. Can I somehow control zorder globally > within a figure? Hi Jeff, add these two lines before your plt.show() ax1.set_zorder(ax2.get_zorder()+1) # put ax in front of ax2 ax1.patch.set_visible(False) # hide the 'canvas' > > Alternatively, I could make the bar chart the first plot/axes ax1, but the > position for its y-axis must be on the right, the line chart's y-axis on the > left. Can this be controlled? ax1.yaxis.tick_right() ax2.yaxis.tick_left() best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |