Description Usage Arguments Value Author(s) Examples
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.
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 | 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 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 |
A ScaleDiscrete
object that can be added to a ggplot
object.
Russell Dinnage r.dinnage@gmail.com
1 2 3 4 5 6 7 8 9 10 11 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.