SyntaxFix
Write A Post
Hire A Developer
Questions
There is a clear figure command, and it should do it for you:
plt.clf()
If you have multiple subplots in the same figure
plt.cla()
clears the current axes.