Skip to content

Commit 8aead50

Browse files
authored
added to scale-hue.r documentation to explain behavior when using named color vectors (#4243)
1 parent d700a0b commit 8aead50

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

R/scale-hue.r

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ scale_fill_hue <- function(..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0
7676
#' * A character vector of color codes. The codes are used for a 'manual' color
7777
#' scale as long as the number of codes exceeds the number of data levels
7878
#' (if there are more levels than codes, [scale_colour_hue()]/[scale_fill_hue()]
79-
#' are used to construct the default scale).
79+
#' are used to construct the default scale). If this is a named vector, then the color values
80+
#' will be matched to levels based on the names of the vectors. Data values that
81+
#' don't match will be set as `na.value`.
8082
#' * A list of character vectors of color codes. The minimum length vector that exceeds the
8183
#' number of data levels is chosen for the color scaling. This is useful if you
8284
#' want to change the color palette based on the number of levels.

man/scale_colour_discrete.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)