if (FALSE) {
jjj = local.file('hi', 'png')
x= rnorm(10)
y= rnorm(10)
plot(x,y)
print('resize the current plot')
jpng(jjj, width = 8, height = 8)
plot(x,y)
dev.off()
jpdf("HiThere.pdf", width = 8, height = 8 )
plot(x,y)
dev.off()
jpng("HiThere.png", width = 8, height = 8 , bg='red' )
plot(x,y)
dev.off()
}
Run the code above in your browser using DataLab