-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscale_continuous.Rd
63 lines (56 loc) · 1.67 KB
/
scale_continuous.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scales.R
\name{scale_continuous}
\alias{scale_continuous}
\alias{scale_color_mn_c}
\alias{scale_colour_mn_c}
\alias{scale_fill_mn_c}
\title{Continuous scales to use for ggplot2}
\usage{
scale_color_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
scale_colour_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
scale_fill_mn_c(
diverge = FALSE,
high_color = "minnesota_blue",
low_color = "minnesota_green",
color_range = 0.75,
...
)
}
\arguments{
\item{diverge}{logical value to indicate whether color values should diverge. Defaults to FALSE.}
\item{high_color}{character color name or index value for high values. Defaults to "minnesota_blue". See `show_palette_mn` for all names.}
\item{low_color}{character color name or index value for low values. Defaults to "minnesota_green".}
\item{color_range}{numeric specifying the amount of lightening. Negative numbers cause darkening. Defaults to 0.75.}
\item{...}{Arguments to pass on to `ggplot2::scale_color_gradient` (non-diverging) or
`ggplot2::scale_color_gradient2` (diverging)}
}
\value{
A `ScaleContinous` object that can be added to a `ggplot` object
}
\description{
These functions provide the option to use State of Minnesota continuous palette colors
with ggplot2.
}
\details{
Available State of Minnesota color names are available in the `show_palette_mn` function.
}
\examples{
if (require("ggplot2")) {
ggplot(mtcars, aes(x = mpg, y = hp, color = wt)) +
geom_point(size = 4) +
scale_color_mn_c()
}
}