LupoA / lsdensities

Smeared spectral densities from lattice correlators
GNU General Public License v3.0
3 stars 0 forks source link

`plt.clf(); plt.close(fig)` is redundant #36

Closed edbennett closed 5 months ago

edbennett commented 6 months ago

Closing a figure destroys it and everything in it; you don't need to call plt.clf() beforehand to clear it.

nickforce989 commented 5 months ago

I should have solved this one.

edbennett commented 5 months ago

In a pull request or on the main branch?

nickforce989 commented 5 months ago

Main branch.

edbennett commented 5 months ago

plt.show(); plt.clf() is also redundant

edbennett commented 5 months ago

Sorry for not being explicit—in this context you want the .show() since otherwise the figure will be discarded without ever being seen. The .show() also discards the figure once it's done, so the clf() can be removed.