README.md

jerzpals

Color palettes for R and ggplot2 inspired by my stylish friend and colleague, Jerzy Eisenberg-Guyot. Jerzy is many things to many people, but he is a paragon of style to just about everyone. This package is a way to bring Jerzy's style to the masses.

This package was a convenient excuse to learn how to build packages in R and host them on Github (and eventually CRAN). And also an opportunity to work with my wife, Tanya Basmadjian Avoundjian, who is a very talented graphic designer (who is always supplying me with awesome color palettes for visualizations!).

Installation

To install, run the following in R:

devtools::install_github("tavoundjian/jerzpals")

Usage

The functions scale_fill_jerzeg and scale_color_jerzeg can be used directly with ggplot2.

Arguments

Examples

library(jerzpals)

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 = "jerzshoe2", discrete = T) +
theme_bw()

# Continuous scale
ggplot(data = iris, aes(x = Petal.Width, y = Petal.Length)) +
geom_point(aes(color = Sepal.Width)) +
scale_color_jerzeg(option = "H", begin = 0, end = 0.5) + # use begin and end to set range of colors used in the palette
theme_bw()

Palettes

jerzshoe1 (option = "A")

jerzshoe1

jerzeg (option = "B")

jerzeg

jerzhat (option = "C")

jerzhat

jerzshirt (option = "D")

jerzshirt

jerzshoe2 (option = "E")

jerzshoe2

jerzjacket (option = "F")

jerzjacket

jerzpack1 (option = "G")

jerzpack1

jerzpack2 (option = "H")

jerzpack2



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