Re: [matplotlib-devel] Axes.add_line() is oddly slow?

2008-10-07 Thread Michael Droettboom
According to lsprofcalltree, the slowness appears to be entirely in the units code by a wide margin -- which is unfortunately code I understand very little about. The difference in timing before and after adding the line to the axes appears to be because the unit conversion is not invalidated

[matplotlib-devel] Installation bug on OS X

2008-10-07 Thread Keaton Mowery
Hey all, I hope this is the right list for this sort of thing, but here goes. My installation of matplotlib (via macports) bombed out with this error: Traceback (most recent call last): File "setup.py", line 125, in if check_for_tk() or (options['build_tkagg'] is True): File "/opt/local

Re: [matplotlib-devel] Axes.add_line() is oddly slow?

2008-10-07 Thread John Hunter
On Tue, Oct 7, 2008 at 9:18 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > According to lsprofcalltree, the slowness appears to be entirely in the > units code by a wide margin -- which is unfortunately code I understand very > little about. The difference in timing before and after adding th

Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread Michael Droettboom
This isn't quite what I was suggesting (and seems to be equivalent to the code as before). In the common case where there are no units in the data, this will still traverse the entire list. I think replacing the whole loop with: converter = self.get_converter(iter(x).next()) would be even b

Re: [matplotlib-devel] path simplification with nan (or move_to)

2008-10-07 Thread Michael Droettboom
Eric Firing wrote: > Mike, John, > > Because path simplification does not work with anything but a > continuous line, it is turned off if there are any nans in the path. > The result is that if one does this: > > import numpy as np > xx = np.arange(20) > yy = np.random.rand(20) > #plot(x

Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread John Hunter
On Tue, Oct 7, 2008 at 11:26 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > This isn't quite what I was suggesting (and seems to be equivalent to > the code as before). In the common case where there are no units in the > data, this will still traverse the entire list. > > I think replacing t

Re: [matplotlib-devel] SF.net SVN: matplotlib:[6166] trunk/matplotlib/lib/matplotlib/units.py

2008-10-07 Thread Michael Droettboom
Sorry. I didn't read carefully enough. That's right -- the "if converter: break" was replaced with "return converter". You're right. This is fine. Mike John Hunter wrote: > On Tue, Oct 7, 2008 at 11:26 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > >> This isn't quite what I was sugg

Re: [matplotlib-devel] path simplification with nan (or move_to)

2008-10-07 Thread Eric Firing
Michael Droettboom wrote: Eric Firing wrote: Mike, John, Because path simplification does not work with anything but a continuous line, it is turned off if there are any nans in the path. The result is that if one does this: import numpy as np xx = np.arange(20) yy = np.random.rand(200