ggsave no longer saves arrangeGrob output

955 views
Skip to first unread message

Herbert Jägle

unread,
Jul 23, 2015, 2:38:32 PM7/23/15
to ggplot2
I extensively use ggsave to save plots created with ggplot and arranged with arrangeGrob.
After upgrading to gridExtra 2.0.0 and ggplot 1.0.1 this does no longer work:

p
<- arrangeGrob(qplot(1,1), textGrob("test")) grid.draw(p) # interactive device works ggsave("saving.pdf", p) # gives the error: "plot should be a ggplot2 plot"

Are these packages no longer compatible?


Thanks,
Herbert

Brandon Hurr

unread,
Jul 23, 2015, 3:05:25 PM7/23/15
to Herbert Jägle, ggplot2
I initially had the same issues, but with an update to the bleeding edge it was fine:

require(devtools)
install_github("hadley/ggplot2")
saving.pdf

Herbert Jägle

unread,
Jul 24, 2015, 1:23:21 AM7/24/15
to ggplot2, brando...@gmail.com
Many thanks. Works for me too after updating package scales as well.
Herbert
Reply all
Reply to author
Forward
0 new messages