Learn R Programming

ggthemes (version 2.1.0)

colorblind_pal: Colorblind Color Palette (Discrete) and Scales

Description

An 8-color colorblind safe qualitative discrete palette from http://jfly.iam.u-tokyo.ac.jp/color and the http://wiki.stdout.org/rcookbook/Graphs/Colors%20(ggplot2)/#a-colorblind-friendly-palette{Cookbook for R}.

Usage

colorblind_pal()

scale_colour_colorblind(...)

scale_color_colorblind(...)

scale_fill_colorblind(...)

Arguments

...
Other arguments passed on to discrete_scale to control name, limits, breaks, labels and so forth.

See Also

The dichromat package, dichromat_pal, and scale_color_tableau for other colorblind palettes.

Examples

Run this code
library(scales)
show_col(colorblind_pal()(8))
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
p <- qplot(carat, price, data=dsamp, colour=clarity) + theme_igray()
p + scale_colour_colorblind()

Run the code above in your browser using DataLab