[matplotlib-devel] fix for text3D not passing text kwargs

2010-03-18 Thread Erik Tollerud
In mpl_toolkits.mplot3d, I noticed that if I want to add text in the Axes3D, I need to use Axes3D.text3D . However, that method doesn't pass in kwargs to set the text properties onto the Axes.text method. Hence, I made this simple modification that passes kwargs on text3D on to text so that the pr

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread John Hunter
On Thu, Mar 18, 2010 at 7:46 PM, Fernando Perez wrote: > On Thu, Mar 18, 2010 at 3:49 PM, Christopher Barker > wrote: >> >> >> Good solution, and thanks for working on this! > > Thanks. > > I have one more question on this feature.  I personally think that > this should be the way to use mpl in g

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Fernando Perez
On Thu, Mar 18, 2010 at 3:49 PM, Christopher Barker wrote: > > > Good solution, and thanks for working on this! Thanks. I have one more question on this feature. I personally think that this should be the way to use mpl in general when scripting, and the way I want to teach, because it's easy a

[matplotlib-devel] performance (speed) of logarithmic plots

2010-03-18 Thread Andrew Hawryluk
I've observed a significant difference in the time required by different plotting functions. With a plot of 5000 random data points (all positive, non-zero), plt.semilogx takes 3.5 times as long as plt.plot. (Data for the case of saving to PDF, ratio changes to about 3.1 for PNG on my machine.) I

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Christopher Barker
Fernando Perez wrote: > Based on the feedback, I'll finish it tonight with squeeze=True as a > kwarg, that behaves: > > - if True (default): single axis is returned as a scalar, Nx1 or 1xN > are returned as numpy 1-d arrays, and only NxM with N>1 and M>1 are > returned as a 2d array. > > - if Fal

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Fernando Perez
On Thu, Mar 18, 2010 at 11:47 AM, John Hunter wrote: > I disagree here -- if you are 2,1 or 1,2 rows x cols, 1D indexing is > natural.  This is also the most common use case so the most important > to get right.  If you aren't doing multiple subplots, a plain ol > subplot(111) may be preferred to

[matplotlib-devel] Proposal for a new example of a polar 3d plot

2010-03-18 Thread Jeff Klukas
Attached and also pasted below is an example which creates a 3d figure using polar coordinates rather than the x and y. The solution was created by Armin Moser when I posted a question to the users list. There are currently no examples of polar coordinates in 3D available. Any objections to addin

Re: [matplotlib-devel] Proposal for Broken Axes

2010-03-18 Thread Jeff Klukas
I have implemented breakx and breaky methods for the Axes class and attached the diff for axes.py to this message. You can test out the function with the following examples: -- import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt # Broken y fig = plt.figure(

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread John Hunter
On Thu, Mar 18, 2010 at 2:24 PM, Christopher Barker wrote: > John Hunter wrote: >>> I think the only two options should be scalar or 2-d array, it seems a >>> bit much to have a 1-d array option as well. >> >> I disagree here -- if you are 2,1 or 1,2 rows x cols, 1D indexing is >> natural.  This i

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Christopher Barker
John Hunter wrote: >> I think the only two options should be scalar or 2-d array, it seems a >> bit much to have a 1-d array option as well. > > I disagree here -- if you are 2,1 or 1,2 rows x cols, 1D indexing is > natural. This is also the most common use case so the most important > to get rig

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread John Hunter
On Thu, Mar 18, 2010 at 1:38 PM, Christopher Barker wrote: > I think the only two options should be scalar or 2-d array, it seems a > bit much to have a 1-d array option as well. I disagree here -- if you are 2,1 or 1,2 rows x cols, 1D indexing is natural. This is also the most common use case

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Christopher Barker
Fernando Perez wrote: > While chatting today with John, he suggested that a better api for > this would be to return an *array* of supblots, so that one could > index them with a[i,j] for the plot in row i, column j. That would be nice. > implemented this already, but before committing it, I hav

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Ryan May
On Thu, Mar 18, 2010 at 12:20 PM, Eric Firing wrote: > Fernando Perez wrote: >> While chatting today with John, he suggested that a better api for >> this would be to return an *array* of supblots, so that  one could >> index them with a[i,j] for the plot in row i, column j.  I've >> implemented t

Re: [matplotlib-devel] [patch] Major/Minor Grid z-order

2010-03-18 Thread Jed Frechette
Jed Frechette wrote: > I made a one line change to matplotlib.axis.Axis.draw (attached) that > simply reverses the order that ticks are plotted in. Argh, I knew that was to easy. This is only a partial fix because the horizontal minor grid still gets drawn above the vertical major grid. -- Je

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Eric Firing
Fernando Perez wrote: > Howdy, > > On Wed, Feb 24, 2010 at 11:27 AM, Fernando Perez wrote: >> OK, since I know people are busy, I took silence as acquiescence. >> Committed in r8151, please let me know if I messed anything up and >> I'll try to fix it. I'm used to the numpy docstring standard, b

[matplotlib-devel] crash when calling show() in a module importing a swig generated wrapper module

2010-03-18 Thread Christian Vollmer
I have a python module that imports a module generated with swig. When I try to call the show() function of matplotlib later in that module, python crashes. When I comment the imported swig module out, everything works fine. A backtrace obtained by debugging with gdb is shown below. Does anyone

Re: [matplotlib-devel] An easier way to create figure and group of axes; useful?

2010-03-18 Thread Fernando Perez
Howdy, On Wed, Feb 24, 2010 at 11:27 AM, Fernando Perez wrote: > OK, since I know people are busy, I took silence as acquiescence. > Committed in r8151, please let me know if I messed anything up and > I'll try to fix it.  I'm used to the numpy docstring standard, but I > tried to adapt it to the