I am using an external module which automatically adds a legend to the plot. I would like to know if there is a way of turning off the legend, something like ax.set_legend(False).
I could fix it by hacking the module but I would rather not do that.
example:
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()
Update:
I have raised a github issue for this https://github.com/matplotlib/matplotlib/issues/2792
You need to change the visibility of your legend, try this: ax.legend().set_visible(False)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments