Module plottools.remove
Remove specific artists from an axes.
Axes member functions
remove_lines()
: remove all line artists.remove_markers()
: remove all line artists with markers that are not connected by lines.remove_style()
: remove all line artists that match a style.remove_legend()
: remove legend artist.remove_texts()
: remove text artists.remove_arrows()
: remove arrow, i.e. annotation artists.
Install/uninstall remove functions
You usually do not need to call the install_remove()
function. Upon
loading the remove module, install_remove()
is called automatically.
install_remove()
: install functions of the remove module in matplotlib.uninstall_remove()
: uninstall all code of the remove module from matplotlib.
Functions
def remove_lines(ax)
-
Remove all line artists.
Parameters
ax
:matplotlib axes
Axes from which lines should be removed.
def remove_markers(ax)
-
Remove all line artists with markers that are not connected by lines.
Parameters
ax
:matplotlib axes
Axes from which lines should be removed.
def remove_style(ax, **style)
-
Remove all line artists that match a style.
Parameters
ax
:matplotlib axes
- Axes from which lines should be removed.
style
:dict
Line style (color, linewidth, marker, makeredgecolor, etc.)
def remove_legend(ax)
-
Remove legend artist.
Parameters
ax
:matplotlib axes
Axes from which legend should be removed.
def remove_texts(ax, *indices)
-
Remove text artists.
Parameters
ax
:matplotlib axes
- Axes from which texts should be removed.
indices
:list
ofint
orstr
If specified, remove only the text elements at the specified indices or with the specified text.
def remove_arrows(ax, *indices)
-
Remove arrow, i.e. annotation artists.
Parameters
ax
:matplotlib axes
- Axes from which arrows should be removed.
indices
:list
ofint
orstr
If specified, remove only the annotation elements at the specified indices or with the specified text.
def install_remove()
-
Install remove functions on matplotlib axes. ```
This function is also called automatically upon importing the module.
See Also
def uninstall_remove()
-
Uninstall remove functions from matplotlib axes.
Call this code to disable anything that was installed by
install_remove()
.See Also