scale_color_jerzeg: Jerzy-inspired color scales

Description Usage Arguments Examples

Description

Uses color scales inspired by the stylish Jerzy

Usage

1
scale_color_jerzeg(..., alpha = 1, begin = 0, end = 1, direction = 1, discrete = FALSE, option = "B")

Arguments

...

parameters to discrete_scale or scale_fill_gradientn

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: FALSE - generate continuous palette)

option

character string indicating the palette option to use. Available options are

  • "jerzshoe1" (or "A")

  • "jerzeg" (or "B")

  • "jerzhat" (or "C")

  • "jerzhsirt" (or "D")

  • "jerzshoe2" (or "E")

  • "jerzjacket" (or "F")

  • "jerzpack1" (or "G")

  • "jerzpack2" (or "H")

Examples

 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()

tavoundjian/jerzpals documentation built on Oct. 26, 2020, 5:46 a.m.