scale_colour_disney: Colour scale constructor for some disney-ish colours

Description Usage Arguments Value Examples

View source: R/werpals.R

Description

This is the default colour scale for categorical variables for the disney-like palette. It does not generate colour-blind safe palettes. These are the palettes to choose from:


Palette Colours inspired by:
http://elijahmeeks.com/#content/blog/2015_08_17_palettes

Palette made ffg blog post:
https://drsimonj.svbtle.com/creating-corporate-colour-palettes-for-ggplot2

Usage

1
2
scale_colour_disney(palette = "main", discrete = TRUE,
  reverse = FALSE, ...)

Arguments

palette

Character name of palette in disney_palettes

discrete

Boolean indicating whether colour aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_color_gradientn(), used respectively when discrete is TRUE or FALSE

Value

Colour scale of disney-like palette

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Colour using the small_world palette
library(ggplot2)
ggplot(mtcars, aes(hp, mpg, colour = cyl)) +
  geom_point(size = 4, alpha = .8) +
  scale_colour_disney(
    discrete = FALSE,
    palette = "small_world",
    guide = "none"
  ) +
  facet_wrap(~cyl)

# Colour using the `alice` palette, and where cyl is discrete
library(ggplot2)
ggplot(mtcars, aes(hp, mpg, colour = as.factor(cyl))) +
  geom_point(size = 4, alpha = .8) +
  scale_colour_disney(
    discrete = TRUE,
    palette = "alice",
    guide = "none"
  ) +
  facet_wrap(~cyl)

sciencificity/werpals documentation built on Nov. 5, 2019, 8:45 a.m.