Skip to content

Commit a819813

Browse files
authored
issue #2505, hiding boxplot outliers (#2658)
* expand boxplot documentation; don't try to match strings of length 0 to shape names. closes #2505 * update documentation
1 parent 2b8022d commit a819813

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

R/geom-boxplot.r

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
#'
3838
#' In the unlikely event you specify both US and UK spellings of colour, the
3939
#' US spelling will take precedence.
40+
#'
41+
#' Sometimes it can be useful to hide the outliers, for example when overlaying
42+
#' the raw data points on top of the boxplot. Hiding the outliers can be achieved
43+
#' by setting `outlier.shape = NA`. Importantly, this does not remove the outliers,
44+
#' it only hides them, so the range calculated for the y-axis will be the
45+
#' same with outliers shown and outliers hidden.
46+
#'
4047
#' @param notch If `FALSE` (default) make a standard box plot. If
4148
#' `TRUE`, make a notched box plot. Notches are used to compare groups;
4249
#' if the notches of two boxes do not overlap, this suggests that the medians

R/geom-point.r

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ GeomPoint <- ggproto("GeomPoint", Geom,
146146
)
147147

148148
translate_shape_string <- function(shape_string) {
149-
if (nchar(shape_string[1]) == 1) {
149+
# strings of length 0 or 1 are interpreted as symbols by grid
150+
if (nchar(shape_string[1]) <= 1) {
150151
return(shape_string)
151152
}
152153

man/geom_boxplot.Rd

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)