Pyqt5, Matplotlib2 And The Deprecation Of Axes.hold
Based on demo code from https://gist.github.com/pklaus/3e16982d952969eb8a9a for embedding matplotlib graphs into a qt GUI I have the following code: # https://gist.github.com/pklau
Solution 1:
From the code shown it is not clear, at which point you would actually need hold(False)
.
What the documentation says is that you should clear the axes explicitely if you need to instead of relying on some automatic clearance. I.e. use self.axes.clear()
at any point you like to clear the axes and remove its content. Whether you actually need to clear the axes depends on your usage case.
Usually updating the artists in an axes is a much cleaner way than clearing the axes and recreating the artists.
(You may want to update your question to include more information about what exactly you are doing, for someone to jugde at which point you would need that.)
Post a Comment for "Pyqt5, Matplotlib2 And The Deprecation Of Axes.hold"