library(ggplot2)
df <- data.frame(x=1:10, y=rnorm(10))
p1 <- ggplot(df, aes(x,y)) + geom_point()
plist <- list(p1,p1,p1,p1,p1)
# In my real example,a plot function will fit a ggplot to a list of datasets
#and return a list of ggplots like the example above.
Ich möchte die Plots mit grid.arrange()
in gridExtra
arrangieren.Wie ordne ich eine variable Liste von Plots mit grid.arrange an?
Wie würde ich das tun, wenn die Anzahl der Plots in plist
variabel ist?
Dies funktioniert: grid.arrange(plist[[1]],plist[[2]],plist[[3]],plist[[4]],plist[[5]])
aber ich brauche eine allgemeinere Lösung. Gedanken?
das ist in '? Grid.arrange' – baptiste