Re: [Matplotlib-users] contour coordinates

2009-02-02 Thread Michael Droettboom
matplotlib uses some C-based contouring code that began life in GIST. You can see it here: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/src/cntr.c?revision=5781&view=markup It has some limitations, notably around certain donut-shaped contours, and a number of us hav

Re: [Matplotlib-users] contour coordinates

2009-02-02 Thread Lionel Roubeyrie
Hi all, just a little question : how matplotlib computes contours? Is it based on an internal library? Is it possible to access it from outside? Thanks Le vendredi 30 janvier 2009 à 10:22 -0500, Eli Brosh a écrit : > Hello again, > I finally found the command I was looking for. It is the > to_poly

Re: [Matplotlib-users] contour coordinates

2009-01-30 Thread Eli Brosh
Hello again, I finally found the command I was looking for. It is the to_polygons(). Here is what worked : # make a LineCollection of contours col=contour(X,Y,Z,LevelsNumber).collections for i in np.arange(0,LevelsNumber,1): polygoni=col[i].get_paths()[0].to_polygons()[0] print polygoni

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Patrick Marsh
On Tue, Jan 27, 2009 at 7:16 PM, Eli Brosh wrote: > Many thanks to Jeff and to Patric ! > I will try to work along the line suggested by Jeff. > Patric, please send me your code. > I hope to learn from it. > > Thanks again, > Eli Here is a template that can be used. I use this for meteorologica

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Eli Brosh
Many thanks to Jeff and to Patric ! I will try to work along the line suggested by Jeff. Patric, please send me your code. I hope to learn from it. Thanks again, Eli On Tue, Jan 27, 2009 at 7:09 PM, Patrick Marsh wrote: > On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker wrote: > > Eli Brosh wro

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Patrick Marsh
On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker wrote: > Eli Brosh wrote: >> Hello, >> I am trying to extract the coordinates of contour lines. >> I tried the following: >> >> cs = *contour*(Z) >> for lev, col in zip(cs.levels, cs.collections): >> s = col._segments >> >> that I found in a prev

Re: [Matplotlib-users] contour coordinates

2009-01-27 Thread Jeff Whitaker
Eli Brosh wrote: > Hello, > I am trying to extract the coordinates of contour lines. > I tried the following: > > cs = *contour*(Z) > for lev, col in zip(cs.levels, cs.collections): > s = col._segments > > that I found in a previous post (title "contouring", by Jose > Gómez-Dans-2

[Matplotlib-users] contour coordinates

2009-01-27 Thread Eli Brosh
Hello, I am trying to extract the coordinates of contour lines. I tried the following: cs = *contour*(Z) for lev, col in zip(cs.levels, cs.collections): s = col._segments that I found in a previous post (title "contouring", by Jose Gómez-Dans-2