I'm making boxplots directly from summary stats, and the width parameter seems to not be taken into account for those. How can I change the width of the boxes in this case? I get a "unknown parameter ignored" if I specify width as I would normally do, and I can't quite figure out how (or if) I can use varwidth using the N column.
df <- structure(list(Area = c("a", "b", "c"), Q5 = c(8.545403328, 23.436503552,
28.134954848), Q10 = c(10.197717376, 23.558146304, 31.434514496
), Q25 = c(15.15465952, 23.92307456, 41.33319344), Q50 = c(63.55833792,
24.53128832, 58.74331232), Q75 = c(88.69784, 31.6778, 71.69319696
), Q90 = c(102.504292352, 35.965707008, 73.563454272), Q95 = c(107.106443136,
37.395009344, 74.186873376), N = c(5L, 3L, 4L)), .Names = c("Area",
"Q5", "Q10", "Q25", "Q50", "Q75", "Q90", "Q95", "N"), row.names = c(NA,
-3L), class = c("tbl_df", "tbl", "data.frame"))
plot:
library(ggplot2)
ggplot(df) +
geom_boxplot(aes(x = Area, lower = Q25, upper = Q75, middle = Q50,
ymin = Q10, ymax = Q90), stat = "identity", size = 0.1)