import matplotlib.pyplot as plt
fig, ax = plt.subplots()
# do stuff here
fig = ax = None
del(fig, ax)
plt.show()
The None
and del
lines do not prevent the figure from showing. Is there any way to once I've created it? Is the only way to avoid showing a figure not creating it in the first place?