Re: [Matplotlib-users] pylab, twinx, and displayed coordinates

2011-09-23 Thread Paul Ivanov
Hi Andreas, On Fri, Sep 23, 2011 at 2:08 PM, Andreas Matthias wrote: > 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? y

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Gökhan Sever
One more update, before heading to the bed. I have managed to adjust my ticks to get what I was asking originally. See the code at http://pastebin.com/XjkDZ486 1-) ax1.yaxis.set_minor_locator(ticker.LogLocator(subs=np.arange(2.0, 10.0)) ) with this line I can get the desired number of minor ticks

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Gökhan Sever
OK, This fixes the minor locations on y-axis ax1.yaxis.set_minor_locator(ticker.LogLocator(subs=np.arange(2.0, 10.0))) Independent of the data-range. It seems like ticker.LogLocator is trying to adjust the minor locs internally. On Fri, Sep 23, 2011 at 7:18 PM, Gökhan Sever wrote: > Hi, > > A

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Gökhan Sever
Hi, Another question is, what sets the tick-location on a log scaled axis? (that 10^-5, 10^-3, 10^-1, 10^1) It seems as if the range is greater than certain value ticks are located this way. Also in a similar way, the location of minor ticks are decided. (If the range is big, no minor ticks, if th

[Matplotlib-users] pylab, twinx, and displayed coordinates

2011-09-23 Thread Andreas Matthias
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? import pylab as mpl mpl.plot([1,3,2]) mpl.twinx() mpl.plot([400,50,100]) mpl.s

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Benjamin Root
On Fri, Sep 23, 2011 at 2:28 PM, Gökhan Sever wrote: > On Fri, Sep 23, 2011 at 1:22 PM, Benjamin Root wrote: > >> On Fri, Sep 23, 2011 at 2:07 PM, Gökhan Sever wrote: >> >>> Hello, >>> >>> Considering this example plot: >>> http://imageshack.us/photo/my-images/27/imagefki.png/ >>> >>> How can I

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Gökhan Sever
On Fri, Sep 23, 2011 at 1:22 PM, Benjamin Root wrote: > On Fri, Sep 23, 2011 at 2:07 PM, Gökhan Sever wrote: > >> Hello, >> >> Considering this example plot: >> http://imageshack.us/photo/my-images/27/imagefki.png/ >> >> How can I get the minor ticks showing correctly? (ie., 9 minor ticks per >>

Re: [Matplotlib-users] Problem with tick locater

2011-09-23 Thread Benjamin Root
On Fri, Sep 23, 2011 at 2:07 PM, Gökhan Sever wrote: > Hello, > > Considering this example plot: > http://imageshack.us/photo/my-images/27/imagefki.png/ > > How can I get the minor ticks showing correctly? (ie., 9 minor ticks per > decade likewise for the x-axis) > > For some reason > > axis.set_

[Matplotlib-users] Problem with tick locater

2011-09-23 Thread Gökhan Sever
Hello, Considering this example plot: http://imageshack.us/photo/my-images/27/imagefki.png/ How can I get the minor ticks showing correctly? (ie., 9 minor ticks per decade likewise for the x-axis) For some reason axis.set_minor_locator(LogLocator(numdecs=9) is not producing the desired output.

Re: [Matplotlib-users] NavigationToolbar2Wx with mplot3d

2011-09-23 Thread Benjamin Root
On Wednesday, September 21, 2011, Benjamin Root wrote: > > > On Wednesday, September 21, 2011, Keith Jones wrote: >> Hi, >> >> I have two questions about using NavigationToolbar2Wx with mplot3d. >> >> >> >> 1/ Initially the 3D scatter plot will rotate as usual with a mouse, but after selecting t

[Matplotlib-users] Picking after a subplot geometry change

2011-09-23 Thread Søren Nielsen
Hi, I have a canvas with two subplots on it and the user can pick curves on each subplot (all lines are pickable). I have created the ability to hide one subplot and only show one of the two. The remaining subplot is also enlarged to fit the canvas. This is done using: self.subplot1.set_visible(T

Re: [Matplotlib-users] axis labels clipped

2011-09-23 Thread Tony Yu
On Fri, Sep 23, 2011 at 9:01 AM, Kurt Mueller wrote: > > Without the resize event it works as expected. > With the resize event (as you suggested), > it only adjusts the borders of the four axes to the outside of the figure. > But between the axes there is no space at all. > > Do I miss something

Re: [Matplotlib-users] axis labels clipped

2011-09-23 Thread Kurt Mueller
A while back, I wrote some functions to calculate a good set of parameters for subplots_adjust (see attached; examples in if-main block at bottom). I've been using these functions pretty regularly, and it works pretty well for my purposes. The function has to draw the figure a couple of times

Re: [Matplotlib-users] axis labels clipped

2011-09-23 Thread yam850
Tony Yu-3 wrote: > > A while back, I wrote some functions to calculate a good set of parameters > for subplots_adjust (see attached; examples in if-main block at bottom). > I've been using these functions pretty regularly, and it works pretty well > for my purposes. > > The function has to dr

Re: [Matplotlib-users] subclassing ndarry

2011-09-23 Thread Martijn
Hi, I found that ndarray is the wrong class to use for this purpose. The vector I created in the example below was just en uninitialised 3D vector. Arrays cannot be subclassed: class Vector(np.array): pass returns an error. But using a matrix as base class works: class Vector(np.matrix):