Close Matplotlib before running a script
@@ -71,6 +71,13 @@ def __clear_mods__():
except KeyError:
pass
+ try:
+ import matplotlib.pyplot as plt
+ plt.close()
+ plt.clf()
+ except:
+ pass
+
keys = list(sys.modules.keys())
for key in keys:
try:
