clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 48 forks source link

Remove all uses of hold() command. #210

Closed ketch closed 7 years ago

ketch commented 7 years ago

Our calls to plt.hold(True) now have no effect except to trigger a deprecation warning. This is because hold is set to True now by default.

This PR is compatible only with matplotlib 2.0+.

It may be necessary in some places to add calls to clf() since the default behavior of matplotlib has changed (but that need is unaffected by this PR, and that changed happened quite awhile ago, so I doubt that anything is needed).

ketch commented 7 years ago

See http://matplotlib.org/api/api_changes.html#hold-functionality-deprecated

mandli commented 7 years ago

Instead of removing these should we check the matplotlib version or did the change to True by default already occur?

ketch commented 7 years ago

I believe it occurred a very long time ago. @rjleveque says it's been that way since he started using Python.

mandli commented 7 years ago

I definitely do not remember although I stopped relying on hold awhile ago. If the default behavior is fine back awhile I would say merge this as is.

ketch commented 7 years ago

Yeah, my bolded statement about compatibility above was wrong. It should have just said "the deprecation warnings that this avoids are only present in Matplotlib 2.0+".