I'm not sure what the problem is but, if nothing else, it looks like you need
to do
library(grid)
It may be that an early version of ggplot2 or gridExtra was automatically
loading grid and it no longer does.
On Monday, January 9, 2017 1:08 AM, Felipe Carrillo via R-help
<[email protected]> wrote:
Hi;The code below used to work on my older version of gridExtra but doesn't
work with the new version. Could someonegive me a hint on how to translate this
code to the new version of gridExtra code? Thank you beforehand.
p1 <- ggplot(iris,aes(Sepal.Length, Petal.Length, colour=Species)) +
geom_point() + theme_bw() + theme(legend.position='top')
grid.arrange(p1, arrangeGrob(p1,p1,p1, heights=c(0.33, .33,.33), ncol=1),
ncol=2)
#Create 2 columns with different width using the 'widths' argument in the
grid.arrange call
grid.arrange(p1, arrangeGrob(p1,p1,p1, heights=c(0.33, .40,.27), ncol=1),
ncol=2,widths=c(1.25,0.75))
p <- rectGrob()
grid.arrange(p, arrangeGrob(p,p,p, heights=c(0.33, .33,.33), ncol=1), ncol=2)
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.