Closed DarioS closed 9 years ago
The title is wrongly placed and the number of rows is ignored.
library(grid) library(gridExtra) library(ggplot2) valuesHealty <- rnorm(20, 10, 2) valuesSick <- rnorm(20, 5, 2) plotData <- data.frame(measure = c(valuesHealty, valuesSick), group = rep(c("healthy", "sick"), each = 20)) densPlot <- ggplot(plotData, aes(x = measure, colour = group)) + stat_density(aes(y = ..density..), geom = "path", position = "identity") boxPlot <- ggplot(plotData, aes(x = group, y = measure)) + geom_boxplot() grid.arrange(densPlot, boxPlot, nrow = 2) # Fine grid.arrange(densPlot, boxPlot, nrow = 2, main = textGrob("Comparisons")) # Problem
the main argument has been renamed top in the latest version
main
top
The title is wrongly placed and the number of rows is ignored.