fix plot1.R to use proper graphic device