I do not save the grid plot but the last individual ggplot. Is there any
way of actually saving the plot as displayed by grid.arrange using
ggsave() or something similar?
(besides using the older way
> jpeg("sgcirNIR.jpg")
> grid.arrange(sgcir1,sgcir2,sgcir3,ncol=2,nrow=2)
> dev.off()
)
Thanks
Agus
--
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
p <- arrangeGrob(qplot(1,1), textGrob("test"))
grid.draw(p) # interactive device
ggsave("saving.pdf", p) # need to specify what to save explicitely
I could add the following line to grid.arrange,
ggplot2:::.store$set(arrangeGrob(...))
so that last_plot() returns the collection of grid objects and your
initial attempt would work, but it seems wrong to me; last_plot()
should probably only return the last ggplot, nothing else. I'm happy
to be convinced otherwise though.
baptiste
baptiste
Agus
2011/4/20 baptiste auguie <bapt...@googlemail.com>:
saludos,
baptiste