Saving the plot generated inside root macro