Update plot*.R code to output to file