scale_color_brewer {ggplot2} R Documentation

Sequential, diverging and qualitative colour scales from ColorBrewer

Description

Usage

scale_color_brewer(
    palette = ['PiYG','PRGn','PuOr','RdBu','RdGy','RdYlBu','RdYlGn','Spectral','Accent','Dark2','Paired',
'Pastel1','Pastel2','Set1','Set2','Set3','Blues','BuGn','BuPu','GnBu','Greens','Greys',
'Oranges','OrRd','PuBu','PuBuGn','PuRd','Purples','RdPu','Reds','YlGn','YlGnBu','YlOrBr',
'YlOrRd'],
    direction = 1,
    alpha = 1,
    name = NULL);

Arguments

name

[as string]

direction

[as integer]

alpha

[as double]

env

[as Environment]

Details

The brewer scales provide sequential, diverging and qualitative colour schemes from ColorBrewer. These are particularly well suited to display discrete values on a map. See https://colorbrewer2.org for more information.

The brewer scales were carefully designed and tested on discrete data. They were not designed to be extended to continuous data, but results often look good. Your mileage may vary.

The following palettes are available for use with these scales:

Diverging

BrBG, PiYG, PRGn, PuOr, RdBu, RdGy, RdYlBu, RdYlGn, Spectral

Qualitative

Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3

Sequential

Blues, BuGn, BuPu, GnBu, Greens, Greys, Oranges, OrRd, PuBu, PuBuGn, PuRd, Purples, RdPu, Reds, YlGn, YlGnBu, YlOrBr, YlOrRd

Modify the palette through the palette argument.

Authors

SMRUCC genomics institute

Value

this function returns data object of type ggplotOption.

clr value class

Examples


[Package ggplot2 version 1.0.0.0 Index]