Closing the figure after processing to free memory