matplotlib

Travis-CI:

This Page

matplotlib.axes.Axes.hold

Axes.hold(b=None)

Set the hold state

Call signature:

hold(b=None)

If hold is None (default), toggle the hold state. Else set the hold state to boolean value b.

Examples:

# toggle hold
hold()

# turn hold on
hold(True)

# turn hold off
hold(False)

When hold is True, subsequent plot commands will be added to the current axes. When hold is False, the current axes and figure will be cleared on the next plot command