Description Usage Arguments See Also Examples
Overwrites the default discrete color scale with SGB-palette pal_sgb_pref
. To use
another palette or custom colors, use scale_color_manual()
.
1 |
... |
parameters passed on to |
Other colour scales:
scale_colour_gradient()
,
scale_fill_discrete()
,
scale_fill_gradient()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
library(ggplot2)
library(gsgb)
theme_set(theme_sgb(base_size = 9))
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point()
# This gives the same:
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point() +
scale_color_discrete()
# To change color scale:
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point() +
scale_color_manual(values = rev(usecol(pal_sgb_rot)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.