Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Eric Firing
On 2015/04/08 11:15 AM, Jody Klymak wrote: Hi Eric, import matplotlib.pyplot as plt fig, axes = plt.subplots(nrows=2,sharex=True) axes[0].set_aspect(1.) axes[0].plot(np.arange(10),np.arange(10)) axes[0].set_ylim([0,24]) axes[0].set_xlim([0,12]) axes[1].plot(np.arange(10),np.arange(10)*2.)

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Jody Klymak
Hi Eric, import matplotlib.pyplot as plt fig, axes = plt.subplots(nrows=2,sharex=True) axes[0].set_aspect(1.) axes[0].plot(np.arange(10),np.arange(10)) axes[0].set_ylim([0,24]) axes[0].set_xlim([0,12]) axes[1].plot(np.arange(10),np.arange(10)*2.) plt.show() does not work as I'd expect.

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Thomas Caswell
What are the data limits you are using? I suspect they you are over constraining the system/order of operations issue. Try dropping the adjustable setting and pre setting both the data limits and the approximate size in figure fraction (ex via grid spec) of the axes. Tom On Tue, Apr 7, 2015,

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Mark Bakker
Thanks, Thomas. That works indeed, but it doesn't make the figure adjustable, which is what I wanted (that the physical size of the axes changes while the aspect ratio is fixed to 1). I guess that functionality has been taken out. Mark On Wed, Apr 8, 2015 at 12:50 PM, Thomas Caswell

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Thomas Caswell
Can you please provide a minimal, but complete and runnable example of what you are doing? On Wed, Apr 8, 2015, 08:13 Mark Bakker mark...@gmail.com wrote: Thanks, Thomas. That works indeed, but it doesn't make the figure adjustable, which is what I wanted (that the physical size of the axes

Re: [Matplotlib-users] Qt4 Designer Example

2015-04-08 Thread Christian Ambros
Hi Ryan, could you write down, as a tutorial, how you built the example with the qt designer?In the last hours I read all most everything what can be found on the issue of getting matplotlib running with pyqt5 and the designer but as you realized yourself, there is little to be found handy. I'm

Re: [Matplotlib-users] Problem with errorbar and log axis

2015-04-08 Thread Markus Haider
Hi Jody, Thank you very much for your help. You are right, this is what I wanted :-) Cheers, Markus On 2015-04-07 23:33, Jody Klymak wrote: xerr is +/- relative to the data: *xerr*/*yerr*: [ scalar | N, Nx1, or 2xN array-like ] If a scalar number, len(N) array-like object, or an Nx1

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Jody Klymak
Following up on this, I’d like to complain about set_aspect()… If I do: import matplotlib.pyplot as plt fig, axes = plt.subplots(nrows=2,sharex=True) axes[0].set_ylim(0,1.) axes[0].set_aspect(1.) plt.show() the x-axis goes from 0. to 1., but axes[0]’s y-axis goes from 0.32 to 0.67. Swapping

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Thomas Caswell
What version had this behavior? I recall some work on how aspect worked, but not exactly what we did. I see why it is useful, but on the other hand that sort of coupling seems like could cause some trouble if we are not careful. This all come back to we need a real layout manager/constraint

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Eric Firing
On 2015/04/08 7:04 AM, Jody Klymak wrote: Following up on this, I’d like to complain about set_aspect()… If I do: import matplotlib.pyplot as plt fig, axes = plt.subplots(nrows=2,sharex=True) axes[0].set_ylim(0,1.) axes[0].set_aspect(1.) plt.show() the x-axis goes from 0. to 1., but

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Eric Firing
On 2015/04/08 7:04 AM, Jody Klymak wrote: Maybe there is a reason for the default, but I really think the data view should be prioritized over the shape of the axis. I forgot to include: I was trying to make everything sane (and reversible) under zoom and pan as well as reshaping and resizing.

Re: [Matplotlib-users] sharex with one figure aspect = 1.0

2015-04-08 Thread Eric Firing
On 2015/04/08 8:43 AM, Jody Klymak wrote: Hi Eric, On 8 Apr 2015, at 11:02 AM, Eric Firing efir...@hawaii.edu wrote: I'm the guilty party for most of how set_aspect works. I developed it a long time ago. Yes, there was a reason--still is, I'm 99% sure--but I don't remember everything, and