saves the figure