satrapade / pairs

1 stars 1 forks source link

vertical stacking of ggplots #1

Open nassuphis opened 6 years ago

nassuphis commented 6 years ago

image

nassuphis commented 6 years ago
g3<-rbind(ggplotGrob(g1), ggplotGrob(g2), size = "last")
  n1 <- length(ggplot_build(g1)$panel$ranges[[1]]$y.labels)
  n2 <- length(g2$panel$ranges[[1]]$y.labels)
  panels <- g3$layout$t[grep("panel", g3$layout$name)]
  g3$heights[panels[1]]<-unit(3,"null")
  g3$heights[panels[2]]<-unit(1,"null")
nassuphis commented 6 years ago

description is here: plot aligned series