As of matplotlib v1.4.0rc4
, a remove
method has been added to the legend object.
Usage:
ax.get_legend().remove()
or
legend = ax.legend(...)
...
legend.remove()
See here for the commit where this was introduced.
More Related Contents:
- Plotting function with matplotlib [closed]
- Moving matplotlib legend outside of the axis makes it cutoff by the figure box
- matplotlib strings as labels on x axis
- Embedding small plots inside subplots in matplotlib
- How to edit a seaborn legend title and labels for figure-level functions
- Matplotlib: setting x-limits also forces tick labels?
- Stop matplotlib repeating labels in legend
- Display two Sympy plots as two Matplotlib subplots
- Pyplot sorting y-values automatically
- Rotate label text in seaborn factorplot
- Calling pylab.savefig without display in ipython
- matplotlib python inline on/off
- matplotlib: colorbars and its text labels
- Matplotlib Colormap with two parameter
- Adding a second y-axis related to the first y-axis
- matplotlib values under cursor [duplicate]
- Matplotlib ion() function fails to be interactive
- How is order of items in matplotlib legend determined?
- Change main plot legend label text
- matplotlib savefig in jpeg format
- matplotlib: 2 different legends on same graph
- Remove line through marker in matplotlib legend
- Matplotlib – sequence is off when using plt.imshow()
- Matplotlib savefig with a legend outside the plot
- matplotlib ticks thickness
- matplotlib: adding padding/offset to polar plots tick labels
- Combine two Pyplot patches for legend
- Adding a matplotlib legend
- Is it possible to add a string as a legend item
- Adding legend based on existing color series