Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee89b6f

Browse files
committed
Prevent contour lines from appearing in legend
svn path=/trunk/matplotlib/; revision=3243
1 parent 0dc7b6f commit ee89b6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def __init__(self, ax, *args, **kwargs):
473473

474474
if level < 0.0 and self.monochrome:
475475
col.set_linestyle((0, rcParams['contour.negative_linestyle']))
476-
col.set_label(str(level)) # only for self-documentation
476+
col.set_label('_nolegend_')
477477
self.ax.add_collection(col)
478478
self.collections.append(col)
479479
self.changed() # set the colors

0 commit comments

Comments
 (0)