Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2
matplotlib
Fork me on GitHub

matplotlib.axes.Axes.hold

Axes.hold(b=None)

Deprecated since version 2.0: axes.hold is deprecated. See the API Changes document (http://matplotlib.org/api/api_changes.html) for more details.

Set the hold state.

The hold mechanism is deprecated and will be removed in v3.0. The behavior will remain consistent with the long-time default value of True.

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