Plot directly to file

Plot directly to file to avoid the screen-to-file distortion.