-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
Could we please have the functionality to disable the legend once its been instantiated?
e.g.
f = plt.figure()
ax = f.add_subplot(111)
externalfunction(ax)
# in the function ax.legend() has been called
# would like to turn off the legend here
plt.show()
From my StackOverflow question (http://stackoverflow.com/questions/21587318/matplotlib-cancel-legend-on-axes-object?noredirect=1#comment32612205_21587318) I have been advised to request this feature.
I also found the problem could be solved with the hack:
ax.get_legend().set_visible(False)
ashleymaeconard and prachiti-bli