contour creates list of LineCollection objects (per each level I
suppose) which is stored in "collections" attribute. For example,

cntr = contour(A, levels)

then

cntr.collections[i] is a LineCollection objects that is associated
with levels[i].

And you can change colors of each line in the LineCollection object
with set_edgecolors method.

So, assuming that there is two contour lines for the first level.

cntr.collections[0].set_edgecolors(["none", "r"])

will change the color of the first contour to "none" (i.e., not drawn)
and the second one to red.

But you need to figure out which one is the one you want.

IHTH,

-JJ


On Tue, Jun 22, 2010 at 2:46 PM, Jonathan Slavin
<jsla...@cfa.harvard.edu> wrote:
> To all:
>
> I'm making a plot with an image and a contour on it.  I use only one
> level in the call to contour, but it results in two distinct contours,
> an inner closed one and an outer open one.  I want to plot only the
> outer piece.  How might I go about that?  I've been looking at the
> properties of the ContourSet object returned by the call to contour but
> can't find anything useful yet.  Is there an attribute of ContourSet
> objects that contains the (x,y) values for the contour?  Is there some
> way to see that a ContourSet object has separate pieces?
>
> Any help would be appreciated.
>
> Thanks,
> Jon
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to