Must get instance of figure before calling savefig.