An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120929/466775fe/attachment.pl>
Removing lower whisker in boxplot to see the effects of the high values
3 messages · Meredith Ballard LaBeau, David Winsemius, Rui Barradas
On Sep 29, 2012, at 10:23 AM, Meredith Ballard LaBeau wrote:
Good Afternoon- I was wanting to alter the boxplot to remove the lower whisker, both the whisker line and staple just on the lower end. Is there a way to do this? As my code is currently: boxplot(log_loads~ind,data=nfmaum, horizontal=TRUE, notch=T, outline=FALSE, whisker=0, main="Maumee River Near Future Climate Scenarios", ylab="Log Load",xlab="Climate Scenarios")
If you altered the value in what is passed from `boxplot.stats` to `bxp` so the lower whisker value was the same as the lower hinge value The lower whisker would merge into the hinge. `boxplot` returns those stats-values invisibly, so you just assign to an object name, make your changes and pass back to bxp.
I just want to better see the medians and high end tail.
David Winsemius, MD Alameda, CA, USA
Hello,
Note that some graphics parameters of boxplot and bxp are not the same.
For instance 'col' becomes 'boxfill'.
boxp <- function(x, ...){
bp <- boxplot(x, ..., plot = FALSE)
bp$stats[1, ] <- bp$stats[2, ]
bxp(bp, ...)
}
x <- rnorm(1000)
boxplot(x, col ="blue", notch = TRUE) # Can also be 'boxfill'
boxp(x, col ="blue", notch = TRUE) # Must be 'boxfill'
boxp(x, boxfill ="blue", notch = TRUE)
Hope this helps,
Rui Barradas
Em 29-09-2012 18:46, David Winsemius escreveu:
On Sep 29, 2012, at 10:23 AM, Meredith Ballard LaBeau wrote:
Good Afternoon- I was wanting to alter the boxplot to remove the lower whisker, both the whisker line and staple just on the lower end. Is there a way to do this? As my code is currently: boxplot(log_loads~ind,data=nfmaum, horizontal=TRUE, notch=T, outline=FALSE, whisker=0, main="Maumee River Near Future Climate Scenarios", ylab="Log Load",xlab="Climate Scenarios")
If you altered the value in what is passed from `boxplot.stats` to `bxp` so the lower whisker value was the same as the lower hinge value The lower whisker would merge into the hinge. `boxplot` returns those stats-values invisibly, so you just assign to an object name, make your changes and pass back to bxp.
I just want to better see the medians and high end tail.