Skip to content

Commit

Permalink
Py3 compatibility: change fig.close to plt.close
Browse files Browse the repository at this point in the history
In older versions of matplotlib, figures had a method close.
They do not anymore, so this has been updated to allow the figures
to close (and memory released)
  • Loading branch information
goldmanm committed Nov 20, 2019
1 parent 3116f08 commit e6d246a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arkane/statmech.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def create_hindered_rotor_figure(self, angle, v_list, cosine_rotor, fourier_roto
['$0$', '$\pi/4$', '$\pi/2$', '$3\pi/4$', '$\pi$', '$5\pi/4$', '$3\pi/2$', '$7\pi/4$', '$2\pi$'])

self.hindered_rotor_plots.append((fig, rotor_index))
fig.close()
plt.close(fig)

def save_hindered_rotor_figures(self, directory):
"""
Expand Down

0 comments on commit e6d246a

Please sign in to comment.