Description Usage Arguments Examples
Uses color scales inspired by the stylish Jerzy
1 | scale_color_jerzeg(..., alpha = 1, begin = 0, end = 1, direction = 1, discrete = FALSE, option = "B")
|
... |
parameters to |
alpha |
pass through parameter to jerz |
begin |
numeric value between 0 and 1. Indicates the first color in the palette |
end |
numeric value between 0 and 1. Indicates the last color in the palette |
direction |
sets the order of the colors in the scale. If 1 (default), colors are output by jerz_pal. If -1, the order of colors is reversed. |
discrete |
generate a discrete palette? (default: |
option |
character string indicating the palette option to use. Available options are
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(ggplot2)
library(jerzpals)
data(iris)
# Discrete scale
ggplot(data = iris, aes(x = Species, y = Petal.Length)) +
geom_bar(aes(fill = Species), stat = "identity") +
scale_fill_jerzeg(option = "jerzshoe1", begin = 0.5, discrete = TRUE) +
theme_bw()
# Continuous scale
ggplot(data = iris, aes(x = Petal.Width, y = Petal.Length)) +
geom_point(aes(color = Sepal.Width)) +
scale_fill_jerzeg(option = "F", begin = 0, end = 0.8) # use begin and end to set range of colors used in the palette
theme_bw()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.