Reputation: 181
I change a new computer and install Python3.6 and matplotlib,When I run the code last month in the old computer, I get the following error: ax.hold(True) AttributeError: 'AxesSubplot' object has no attribute 'hold'
Upvotes: 6
Views: 8694
Reputation: 31
The API Changes document says: Setting or unsetting hold (deprecated in version 2.0) has now been completely removed. Matplotlib now always behaves as if hold=True. To clear an axes you can manually use cla(), or to clear an entire figure use clf().
Upvotes: 3
Reputation: 181
The Axes.hold
method was deprecated since 2.0 and was removed in matplotlib3.0:
Deprecated since version 2.0: axes.hold is deprecated. See the API Changes document (http://matplotlib.org/api/api_changes.html) for more details.
Upvotes: 8