knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

library(ggplot2)
library(rtist)

rtist

Travis build status Dependencies CRAN status Downloads

Overview

"They'll sell you thousands of greens. Veronese green and emerald green and cadmium green and any sort of green you like; but that particular green, never." - Pablo Picasso, (1966)

Use the palettes of famous artists in your own visualizations.

Installation

Install from CRAN or from Github.

``` {r, eval = FALSE}

Using install.packages().

install.packages("rtist")

Install remotes to download.

install.packages("remotes")

And then install from github.

remotes::install_github("tomasokal/rtist")

You can also use `rtist` through Emil Hvitfeldt's popular [`paletteer`](https://github.com/EmilHvitfeldt/paletteer) package.

## Palettes

`rtist` provides color palettes from famous artists and paintings. You can quickly view and see all possible palettes using `rtist_help()`.

``` {r help}
# Load package
library(rtist)

# Display possible palettes
rtist::rtist_help()

There are 15 palettes total.

``` {r palette, fig.height = 5, echo = FALSE} library(rtist) par(mfrow=c(5,3)) for(i in names(rtist_palettes)) print(rtist_palette(i))

After finding a palette, go ahead and select that palette along with however many colors you want.

``` {r palettes, eval = FALSE}
# Load package
library(rtist)

# Choose Warhol
rtist::rtist_palette("warhol")

# Choose 4 colors from Picasso
rtist::rtist_palette("picasso", 4)
library(ggplot2)
library(rtist)

pal <- rtist::rtist_palette("hopper")

ggplot2::ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
    geom_jitter(size = 3) +
    theme_minimal() +
    scale_color_manual(values = pal)

Credits

This package was mostly built to teach me package development. It was largely inspired by Ewen Henderson’s ghibli package and Karthik Ram’s wesanderson package.

The palettes themselves come from 10 Color Palettes Based on Famous Paintings and Color Lisa. Check those out for other awesome palettes.



tomasokal/rtist documentation built on June 20, 2020, 7:25 p.m.