Skip to content

Commit bb0d563

Browse files
committed
Further expand the description of scale_brewer
Give more precisions regarding the intent of the original colours and how ggplot2 modifies them (in the continuous case).
1 parent 6176cf7 commit bb0d563

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

R/scale-brewer.r

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#' Sequential, diverging and qualitative colour scales from colorbrewer.org
22
#'
3-
#' Create discrete or continuous colour scales based on ColorBrewer colors.
3+
#' Create colour scales based on ColorBrewer colours.
4+
#'
5+
#' ColorBrewer provides sequential, diverging and qualitative colour schemes which are particularly suited and tested to display discrete values (levels of a factor) on a map. ggplot2 can use those colours in discrete scales. It also allows to smoothly interpolate the colours to a continuous scale, although the original colour schemes (particularly the qualitative ones) were not intended for this. The perceptual result is left to the appreciation of the user.
6+
#'
47
#' See \url{http://colorbrewer2.org} for more information.
58
#'
69
#' @inheritParams scales::brewer_pal
710
#' @inheritParams scale_colour_hue
11+
#' @inheritParams scale_colour_gradient
812
#' @family colour scales
913
#' @rdname scale_brewer
1014
#' @export

man/scale_brewer.Rd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,20 @@ scale_color_brewerc(..., type = "seq", palette = 1,
3838
\item{na.value}{Colour to use for missing values}
3939
}
4040
\description{
41-
See \url{http://colorbrewer2.org} for more information.
41+
Create colour scales based on ColorBrewer colours.
42+
}
43+
\details{
44+
ColorBrewer provides sequential, diverging and
45+
qualitative colour schemes which are particularly suited
46+
and tested to display discrete values (levels of a
47+
factor) on a map. ggplot2 can use those colours in
48+
discrete scales. It also allows to smoothly interpolate
49+
the colours to a continuous scale, although the original
50+
colour schemes (particularly the qualitative ones) were
51+
not intended for this. The perceptual result is left to
52+
the appreciation of the user.
53+
54+
See \url{http://colorbrewer2.org} for more information.
4255
}
4356
\examples{
4457
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]

0 commit comments

Comments
 (0)