[Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Jonathan Slavin
Hi all, I've run across a minor but annoying bug. It can be demonstrated pretty simply: fig, ax = plt.subplots(2,1,sharex=True,figsize=(7.,7.)) fig.subplots_adjust(hspace=0.0) x = 4.25*(np.arange(6.) - 2.5)/10. y = 0.6*x/max(x) ax[0].plot(x,y) ax[0].set_xlim(-1.2,1.2) ax[0].set_aspect('equal')

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Eric Firing
On 2013/03/20 8:57 AM, Jonathan Slavin wrote: Hi all, I've run across a minor but annoying bug. It can be demonstrated pretty simply: fig, ax = plt.subplots(2,1,sharex=True,figsize=(7.,7.)) fig.subplots_adjust(hspace=0.0) x = 4.25*(np.arange(6.) - 2.5)/10. y = 0.6*x/max(x)

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread ChaoYue
Agree with Eric. I guess if you remove sharex=True, it will work. Chao On Wed, Mar 20, 2013 at 10:27 PM, Eric Firing [via matplotlib] ml-node+s1069221n40690...@n5.nabble.com wrote: On 2013/03/20 8:57 AM, Jonathan Slavin wrote: Hi all, I've run across a minor but annoying bug. It can

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Brendan Barnwell
On 2013-03-20 14:25, Eric Firing wrote: On 2013/03/20 8:57 AM, Jonathan Slavin wrote: Hi all, I've run across a minor but annoying bug. It can be demonstrated pretty simply: fig, ax = plt.subplots(2,1,sharex=True,figsize=(7.,7.)) fig.subplots_adjust(hspace=0.0) x = 4.25*(np.arange(6.) -

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Brendan Barnwell
On 2013-03-20 14:25, Eric Firing wrote: On 2013/03/20 8:57 AM, Jonathan Slavin wrote: Hi all, I've run across a minor but annoying bug. It can be demonstrated pretty simply: fig, ax = plt.subplots(2,1,sharex=True,figsize=(7.,7.)) fig.subplots_adjust(hspace=0.0) x =

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Eric Firing
On 2013/03/20 3:16 PM, Brendan Barnwell wrote: On 2013-03-20 14:25, Eric Firing wrote: On 2013/03/20 8:57 AM, Jonathan Slavin wrote: Hi all, I've run across a minor but annoying bug. It can be demonstrated pretty simply: fig, ax = plt.subplots(2,1,sharex=True,figsize=(7.,7.))

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Jonathan Slavin
Eric, I don't see it that way. Specifying an equal aspect ratio just means that I want the scaling of the axes to the same. Then specifying the data limits gives the overall scaling of the figure effectively. This works perfectly well for a single set of axes. The bounding space is allotted

Re: [Matplotlib-users] set limits not obeyed for stacked plots when set_aspect('equal') used

2013-03-20 Thread Jonathan Slavin
Hmm. It seems that the adjustable='box-forced' option to set_aspect does work. I don't know what went wrong the first time I tried it (probably a typo). So that solves my problem. Thanks Eric. It does seem to me that this should be the default behavior, though I can appreciate the difficulty

Re: [Matplotlib-users] Aligning xticks and labels with WeekdayLocator

2013-03-20 Thread Mark Lawrence
On 19/03/2013 18:35, Paul Hobson wrote: On Tue, Mar 19, 2013 at 11:30 AM, Paul Hobson pmhob...@gmail.com mailto:pmhob...@gmail.com wrote: On Mon, Mar 18, 2013 at 8:34 PM, Mark Lawrence breamore...@yahoo.co.uk mailto:breamore...@yahoo.co.uk wrote: Matplotlib 1.2.0,