currently_active

File Purpose: manage currently active figure, axs, etc.

Functions

current_axes_exists()

tells whether there is a "current" axes.

current_axes_has_data()

returns whether the current axes has any data plotted on it.

current_axes_or_None()

returns current axes, or None if there is no "current axes".

current_figure_exists()

tells whether there is a "current" figure.

current_figure_or_None()

returns current figure, or None if there is no "current figure".

current_image_exists()

tells whether there is a "current" image.

current_image_or_None()

returns current image, or None if there is no "current image".

maintaining_current_axes([enabled])

returns context manager which (if enabled) restores current axes upon exit.

maintaining_current_figure([enabled])

returns context manager which (if enabled) restores current figure upon exit.

maintaining_current_image([enabled])

returns context manager which (if enabled) restores current image upon exit.

maintaining_current_plt(*maintain[, default])

returns context manager which restores current figure, axes, image upon exit.

using_current_axes(axes)

returns context manager which sets current axes upon entry; restores upon exit.

using_current_figure(figure)

returns context manager which sets current figure upon entry; restores upon exit.

using_current_image(image)

returns context manager which sets current image upon entry; restores upon exit.

using_current_plt(*[, figure, axes, image])

returns context manager which sets values for "current" figure, axes, image upon entry; restores upon exit.

Classes

MaintainingCurrentPlt(*maintain[, default])

context manager which restores current figure, axes, image upon exit.

UsingCurrentPlt(*[, figure, axes, image])

context manager which sets values for "current" figure, axes, image upon entry; restores upon exit.