KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to use ggplot2 / geom_boxplot to produce a boxplot where the whiskers are defined as the 5 and 95th percentile instead of 0.25 - 1.5 IQR / 0.75 + IQR and outliers from those new whiskers are plotted as usual. I can see that the geom_boxplot aesthetics include ymax / ymin, but it's not clear to me how I put values in here. It seems like: stat_quantile(quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95)) should be able to help, but I don't know how to relate the results of this stat to set the appropriate geom_boxplot() aesthetics: geom_boxplot(aes(ymin, lower, middle, upper, ymax)) I've seen other posts where people mention essentially building a boxplot-like object manually, but I'd rather keep the whole boxplot gestalt intact, just revising the meaning of two of the variables being drawn.
Tags (comma-separated)
Save Edits
Cancel