Module plottools.remove

Remove specific artists from an axes.

Axes member functions

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.

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 of int or str
 

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 of int or str
 

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

uninstall_remove()

def uninstall_remove()

Uninstall remove functions from matplotlib axes.

Call this code to disable anything that was installed by install_remove().

See Also

install_remove()