hues-ggplot2-scales {hues} | R Documentation |
iwanthue scales to use with ggplot2
Description
These functions allow you to use iwanthue()
generated palettes with
ggplot2
plots. You need ggplot2
installed for these to work. Note these
only work with discrete scales.
Usage
scale_colour_iwanthue(
...,
hmin = 0,
hmax = 360,
cmin = 0,
cmax = 180,
lmin = 0,
lmax = 100,
random = FALSE,
aesthetics = "colour"
)
scale_color_iwanthue(
...,
hmin = 0,
hmax = 360,
cmin = 0,
cmax = 180,
lmin = 0,
lmax = 100,
random = FALSE,
aesthetics = "colour"
)
scale_fill_iwanthue(
...,
hmin = 0,
hmax = 360,
cmin = 0,
cmax = 180,
lmin = 0,
lmax = 100,
random = FALSE,
aesthetics = "fill"
)
Arguments
... |
Arguments to pass on to |
hmin |
Numeric, in the range |
hmax |
Numeric, in the range |
cmin |
Numeric, in the range |
cmax |
Numeric, in the range |
lmin |
Numeric, in the range |
lmax |
Numeric, in the range |
random |
Logical. If |
aesthetics |
Character string or vector of character strings listing the
name(s) of the aesthetic(s) that this scale works with. This can be useful,
for example, to apply colour settings to the colour and fill aesthetics at
the same time, via |
Value
A ScaleDiscrete
object that can be added to a ggplot
object.
Author(s)
Russell Dinnage r.dinnage@gmail.com
Examples
if (require('ggplot2')) {
ggplot(iris, aes(x=Petal.Width, y=Petal.Length)) +
geom_point(aes(color=Species), size=10) +
scale_colour_iwanthue()
ggplot(iris, aes(x=Petal.Width, y=Petal.Length)) +
geom_point(aes(color=Species), size=10) +
scale_colour_iwanthue(hmax = 90)
}