Actually, I just re-read your original message and noticed that you were
specifying your levels (I believe).  The double set of contours depends on
what your values are.  If you want to make absolutely sure that there aren't
extra lines, you could contour a boolean array:

contour(x, y, z > 4.5, [0, 1])

That should do the trick as well (assuming you know the level that you want
the isopleth for).

Ben Root

On Tue, Jun 22, 2010 at 6:27 PM, Benjamin Root <ben.r...@ou.edu> wrote:

> Jon,
>
> One thing you can do is to manually specify the levels to contour for in
> the contour call, or just specify the number of contours (and contour() will
> figure out the levels for you).  The fourth argument to contour() allows you
> to give a sequence of values (or an integer) for the isopleths.  So, if you
> want just one line (but have it chosen automatically):
>
> contour(x, y, z, 1)
>
> If you want a contour to always be for the value of 4.5, for example, then:
>
> contour(x, y, z, [4.5])
>
> Should do the trick.
>
> I hope that helps,
> Ben Root
>
>
>
>
> On Tue, Jun 22, 2010 at 1: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