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<http://www.nabble.com/user/UserProfile.jtp?user=30071>
Nov
30, 2007; 07:47am ) .
I hoped that s will be a list of numpy arrays, each containing the (x,y)
vertices
defining a contour line at level lev.
However, I got an error message:
AttributeError: 'LineCollection' object has no attribute '_segments'
How is it possible to get coordinates of the contours, similar to the MATLAB
command
[C,H] = *CONTOUR*(...)
where the result in C is the coordinates of the contours.
A similar question appeared in a post "contour data" (by Albert
Swart<http://www.nabble.com/user/UserProfile.jtp?user=382945> May
17, 2006; 09:42am) but I could not understand the answer.
Is it possible to get more specific directions with a simple example ?
Thanks
Eli
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users