On Saturday, August 13, 2011, Özgür <[email protected]> wrote:
> Please forget it. For now the real problem is: I am plotting by using
"contour" and I get the data values by using get_paths. But it does not
include some part of the contour. A screenshot is attached. The colored
lines are those returned by get_paths. But the black line is not included. I
guess this is a bug?
>
> contour = plt.contour(xi,yi,zi,numberoflevels,linewidths=1,colors='k')
> lev = contour.levels
> col = contour.collections
> polygons = []
> for i in range(len(lev)):
> polygons.append (col[i].get_paths()[0].vertices)
>
> ... other code to plot the colored points...
>
You are assuming that there are the same number of contours as levels. In
the general case, this can never be assumed. Why not just simply loop over
the collections(or, even better, use a list comprehension)?
Ben Root
------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy
to use, easy to manage, easy to install, easy to extend.
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users