[matplotlib-devel] [Patch] NonUniformImage uses np.asarray; should use ma.asarray

2008-07-21 Thread Klaus Zimmermann
Hello *, right now the NonUniformImage class in image.py uses numpy's asarray method. All similar classes instead use numpy.ma.asarray, thus allowing for masked images. I think this should be changed as in the attached patch. Otherwise thanks for matplotlib :) Klaus Index: matplotlib/lib/matplotl

Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-21 Thread Gael Varoquaux
On Sat, Jul 19, 2008 at 08:05:52AM +0200, Gael Varoquaux wrote: > On Sat, Jul 19, 2008 at 07:31:19AM +0200, Gael Varoquaux wrote: > > - show starts a mainloop and is blocking even if there are not windows > > open. This basically leads to a deadlock where the user cannot > > interrupt the

Re: [matplotlib-devel] [Patch] NonUniformImage uses np.asarray; should use ma.asarray

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 3:12 AM, Klaus Zimmermann <[EMAIL PROTECTED]> wrote: > Hello *, > > right now the NonUniformImage class in image.py uses numpy's asarray > method. All similar classes instead use numpy.ma.asarray, thus allowing > for masked images. > I think this should be changed as in the

Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 4:07 AM, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > Could somebody review this patch and possibly check it in? It is not > perfect but is, IMHO, a good start that works on everything I have thrown OK, looks good; I've committed it to svn r5798. I have commented out the t

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread David Kaplan
Hi, On Sun, 2008-07-20 at 08:09 -1000, Eric Firing wrote: > It sounds like there is time to do it before the release without messing > up the release. Just make sure the backend_drivers.py test suite still > runs OK. If you can add tests (i.e., examples run by backend_drivers) > that exercise

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 7:51 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > 2) Can someone explain to me why is_string_like in the cbook doesn't > just do isinstance(obj,str)? Is there anything "string like" that won't > be caught be this isinstance call? In [65]: s = u'jdh' In [66]: isinsta

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread David Kaplan
Hi, Similar level of question: What is the policy on using scipy in matplotlib? I want to use linear interpolation, and simple_linear_interpolation in the cbook doesn't do what I want. I imagine that we are trying to avoid dependence on scipy. Thanks, David On Mon, 2008-07-21 at 08:42 -0500,

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 10:17 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > Similar level of question: What is the policy on using scipy in > matplotlib? I want to use linear interpolation, and > simple_linear_interpolation in the cbook doesn't do what I want. I > imagine that we are trying to a

Re: [matplotlib-devel] Progress on interactive backend detection

2008-07-21 Thread Gael Varoquaux
On Mon, Jul 21, 2008 at 05:30:00AM -0500, John Hunter wrote: > On Mon, Jul 21, 2008 at 4:07 AM, Gael Varoquaux > <[EMAIL PROTECTED]> wrote: > > Could somebody review this patch and possibly check it in? It is not > > perfect but is, IMHO, a good start that works on everything I have thrown > OK,

[matplotlib-devel] Modifications to axis.py to allow more flexibility in positioning axis lines, ticks, etc.

2008-07-21 Thread Tony Yu
I've been to trying add more flexible control over the axis lines, ticks, tick labels, etc., but I think I'm in over my head on this project. Again and again, I've settled on one approach only to completely rewrite it the next time I look at the code. I'm looking for some major design advic

Re: [matplotlib-devel] offset_copy()

2008-07-21 Thread Andrew Straw
Ryan May wrote: > Hi, > > I noticed that offset_copy() went away in the transforms rewrite and was > replaced with a trans + transfroms.Affine2D().translate(x,y). This > works fine for x,y in pixels. However, offset_copy would also let you > specify x,y in points. How can I get that to work

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread Eric Firing
John Hunter wrote: > On Mon, Jul 21, 2008 at 7:51 AM, David Kaplan <[EMAIL PROTECTED]> wrote: > >> 2) Can someone explain to me why is_string_like in the cbook doesn't >> just do isinstance(obj,str)? Is there anything "string like" that won't >> be caught be this isinstance call? > > In [65]:

Re: [matplotlib-devel] Wind Barbs Full Patch

2008-07-21 Thread Eric Firing
Ryan May wrote: > John Hunter wrote: >> On Sat, Jul 19, 2008 at 11:09 PM, Ryan May <[EMAIL PROTECTED]> wrote: >> >>> The only issue I've seen is that scaling with PS is way too big. I've >>> attached ps and pdf files from the same run to show the problem. >> The only thing I can think of is since

Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-21 Thread Christopher Barker
Jeff Whitaker wrote: >> Basically, Fortune's sweepline algorithm for Delaunay triangulation >> simply needs to be replaced with an algorithm that can be formulated >> using Jonathan Shewchuck's robust predicates: >> >> http://www.cs.cmu.edu/~quake/robust.html great idea. > I chec

Re: [matplotlib-devel] reverting changes to contour.py

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 1:06 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > John Hunter wrote: >> >> On Mon, Jul 21, 2008 at 7:51 AM, David Kaplan <[EMAIL PROTECTED]> wrote: >> >>> 2) Can someone explain to me why is_string_like in the cbook doesn't >>> just do isinstance(obj,str)? Is there anything

Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-21 Thread Christopher Barker
arrg! When am I going to learn not to click "send" until after I've read the entire thread! Jeff Whitaker wrote: > John: I just contacted NCAR again, and it seems that they have > relicensed the software under an OSI-based license similar to the > University of Illinois/NCSA: ... > What do yo

Re: [matplotlib-devel] [Patch] NonUniformImage uses np.asarray; should use ma.asarray

2008-07-21 Thread Eric Firing
John Hunter wrote: > On Mon, Jul 21, 2008 at 3:12 AM, Klaus Zimmermann > <[EMAIL PROTECTED]> wrote: >> Hello *, >> >> right now the NonUniformImage class in image.py uses numpy's asarray >> method. All similar classes instead use numpy.ma.asarray, thus allowing >> for masked images. >> I think this

Re: [matplotlib-devel] Collections set/get_offsets method

2008-07-21 Thread Eric Firing
Ryan May wrote: > Hi, > > As promised, here's a short patch to add get_offsets() and set_offsets() > to the Collections() base class. I tried to make it do the right thing > with regard to _offsets vs. _uniform_offsets, depending on whether > _uniform_offsets is None. I also had tried to make

Re: [matplotlib-devel] Any short plan for a new release (0.98.2 for real or 0.98.3)?

2008-07-21 Thread Robert Kern
Christopher Barker wrote: > Jeff Whitaker wrote: >> I checked >> Shewchuk's web page and unfortunately his code comes with this license: > > ... > > How I wish people would just pick a known Open Source License -- it's > not like there are a shortage of them! Might it be worth a note to > She

Re: [matplotlib-devel] hexbin and nans

2008-07-21 Thread Eric Firing
Andrew Straw wrote: >> may be the quickest and most general way to do it. I believe >> ~np.isfinite is both more general and significantly faster than np.isnan. > > Clever, but it won't work as-is. np.isfinite('b') returns a > NotImplementedType, and a default argument to scatter is c='b', which

[matplotlib-devel] units support

2008-07-21 Thread Eric Firing
John, I am still struggling to understand exactly how units support works, and what is needed to make it work everywhere that it should. I see that it works in plot, for example; it is not even necessary to use plot_date. It does not work in scatter, and at first I thought that was because of

Re: [matplotlib-devel] Collections set/get_offsets method

2008-07-21 Thread Eric Firing
Eric Firing wrote: > Ryan May wrote: >> Hi, >> >> As promised, here's a short patch to add get_offsets() and set_offsets() >> to the Collections() base class. I tried to make it do the right thing >> with regard to _offsets vs. _uniform_offsets, depending on whether >> _uniform_offsets is None.

Re: [matplotlib-devel] [Patch] NonUniformImage uses np.asarray; should use ma.asarray

2008-07-21 Thread Klaus Zimmermann
Eric Firing schrieb: John Hunter wrote: On Mon, Jul 21, 2008 at 3:12 AM, Klaus Zimmermann <[EMAIL PROTECTED]> wrote: Hello *, right now the NonUniformImage class in image.py uses numpy's asarray method. All similar classes instead use numpy.ma.asarray, thus allowing for masked images. [...] M

Re: [matplotlib-devel] Empty wind barb suggestion

2008-07-21 Thread Michael Droettboom
I don't know if this simplifies things (you're much deeper in the middle of doing what you need to do), but PolyCollection really is a path collection these days. (The name is really for historical reasons). And since paths can be compound, you could draw a hollow circle using an inner and an

Re: [matplotlib-devel] Wind Barbs Full Patch

2008-07-21 Thread Michael Droettboom
Ryan May wrote: > 5) I added an empty circle marker for low wind speeds (vector > magnitudes). Accomplishing having the unfilled circle while having > the barbs filled involved a bit of a "elegant hack". Using the set of > vertices that draws the CirclePolygon, I add an additional copy of > t

Re: [matplotlib-devel] offset_copy()

2008-07-21 Thread Michael Droettboom
I'll update the example. You may also find ScaledTranlation useful for what you're doing. It will allow you to avoid hardcoding the dpi. http://matplotlib.sourceforge.net/doc/html/devel/transformations.html#matplotlib.transforms.ScaledTranslation Cheers, Mike Andrew Straw wrote: > Ryan May wr

Re: [matplotlib-devel] units support

2008-07-21 Thread Michael Droettboom
I'll second being confused at times. In the transformation conversion, it was something I didn't know too much about up front, so it's quite possible that I broke some things in that regard. (I know of some already, but those were fixed shortly after things were merged into the trunk around 0

Re: [matplotlib-devel] units support

2008-07-21 Thread John Hunter
On Mon, Jul 21, 2008 at 5:25 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > I'll second being confused at times. In the transformation conversion, it > was something I didn't know too much about up front, so it's quite possible > that I broke some things in that regard. (I know of some alrea

Re: [matplotlib-devel] offset_copy()

2008-07-21 Thread Michael Droettboom
The solution is sufficiently obscure, that I decided to just re-introduce offset_copy (r5804). It appears to work as before, and the example works without changes, though let me know if you run into any snags. Cheers, Mike Michael Droettboom wrote: > I'll update the example. You may also find

Re: [matplotlib-devel] units support

2008-07-21 Thread Ted Drain
John, It seems like a slightly different design and some refactoring of the code would help with this (of course that's WAY easier to say than it is to do). I'm thinking of something like this: Public API layer: Very thin (i.e. minimum amount of code). The goal of this layer might be to transform

Re: [matplotlib-devel] Collections set/get_offsets method

2008-07-21 Thread Ryan May
Eric Firing wrote: > Eric Firing wrote: >> Ryan May wrote: >>> Hi, >>> >>> As promised, here's a short patch to add get_offsets() and >>> set_offsets() to the Collections() base class. I tried to make it do >>> the right thing with regard to _offsets vs. _uniform_offsets, >>> depending on wheth

Re: [matplotlib-devel] Wind Barbs Full Patch

2008-07-21 Thread Ryan May
Michael Droettboom wrote: > Ryan May wrote: >> 5) I added an empty circle marker for low wind speeds (vector >> magnitudes). Accomplishing having the unfilled circle while having >> the barbs filled involved a bit of a "elegant hack". Using the set of >> vertices that draws the CirclePolygon,

[matplotlib-devel] TextCollection

2008-07-21 Thread Ryan May
Hi, Has anyone ever thought about creating a TextCollection class? The purpose would be similar to the other collections, to group a bunch of text objects with similar properties. This probably couldn't inherit from Collection as of now though, since Collection assumes things like edgecolor

Re: [matplotlib-devel] [Patch] NonUniformImage uses np.asarray; should use ma.asarray

2008-07-21 Thread Eric Firing
Klaus Zimmermann wrote: > Eric Firing schrieb: >> John Hunter wrote: >>> On Mon, Jul 21, 2008 at 3:12 AM, Klaus Zimmermann >>> <[EMAIL PROTECTED]> wrote: Hello *, right now the NonUniformImage class in image.py uses numpy's asarray method. All similar classes instead use numpy.m