Dear Felix, > I would like to run R scripts like that: R -f script.r and still get the > plots that pop up.
Since you are using ggplot2, you can use the ggsave function from the package to save the plot to a location of your choice. I tested the following script from the command line and it worked. library(ggplot2) data("midwest", package="ggplot2") ggplot(midwest, aes(x=area, y=poptotal)) + geom_point() ggsave(paste0(getwd(), "/midwest.png"), device = "png") Regards, Anindya ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.