plot r and png files