data=data.frame(
X=sample(10,1000,replace=T)
, Y=letters[1:10]
)
p=qplot(X, data=data, geom='histogram') + facet_wrap( ~ Y)
save(p, file='error.png')
The above qplot work properly if I don't plot it to a file. But if I
plot it to a png file, the png file is always corrupted. Would you
please let me know what is wrong?
--
Regards,
Peng
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
--
>
Regards,
Peng
--
You received this message because you are
> subscribed to the ggplot2 mailing list.
Please provide a reproducible
> example: http://gist.github.com/270442
To post: email > ymailto="mailto:ggp...@googlegroups.com"
> href="mailto:ggp...@googlegroups.com">ggp...@googlegroups.com
To
> unsubscribe: email ggplot2+> href="mailto:unsub...@googlegroups.com">unsub...@googlegroups.com
More
> options: http://groups.google.com/group/ggplot2
Save is for storing a binary representation of R objects on disk, not
for saving images.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2