add_cat: Add a kitty to your ggplot2 plot

Description Usage Arguments Examples

Description

Grabs a random cat image from http://theoldreader.com/kittens and creates a annotation_raster layer to add to your ggplot2 plot.

Usage

1
add_cat(..., lighten = 0.7, bw = TRUE)

Arguments

...

Arguments passed to get_cat, i.e. height and width

lighten

Number between 0 (no adjustment) and 1 (all white) to lighten the image

bw

Logical, the image should be displayed in grey-scale (FALSE = full colour)

Examples

1
2
3
4
5
6
7
8
9
library(ggplot2)
ggplot(mpg, aes(cty, hwy)) +
 add_cat() +
 geom_point()

# In glorious kitty colours
ggplot(mpg, aes(cty, hwy)) +
 add_cat(bw = FALSE) +
 geom_point()

hilaryparker/cats documentation built on May 17, 2019, 3:58 p.m.