Omitting curves from a legend

You can also use colorbar() to show the levels if you want that
information to be visible, and that's probably more appropriate than a
legend anyway. I think it's a good change. Thanks!

--bb

···

On 4/18/07, Eric Firing <efiring@...202...> wrote:

Bill Baxter wrote:
> There are a couple things about legend that I'm finding a little
> irksome. Is there some better way to do this?
>
> 1) if you have a contour, legend() wants to add all the contours to
> the list. calling contour(...,label='_nolegend_') doesn't seem to
> help.

I think it would be quite unusual that someone would want contour lines
to show up in a legend, so I made the change I suggested in an earlier
response to this thread: the LineCollections in the ContourSet now have
their labels set to _nolegend_. If someone really does want contour
lines in a legend, these labels still can be changed manually, as
described earlier in this thread.