[R] Can not save plot to png file correctly
Felipe Carrillo
mazatlanmexico at yahoo.com
Mon May 31 21:59:56 CEST 2010
With ggsave the graph windows pops up but using:
png("mypng.png")
qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y)
dev.off()
The graph is saved in the background
Is there a way to hide the graph window when
using ggsave?
You can save as png like this too:
library(ggplot2)
data=data.frame(
X=sample(10,1000,replace=T)
, Y=letters[1:10])
png("mypng.png")
qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y)
dev.off()
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
More information about the R-help
mailing list