scale_color_brewer {ggplot2} R Documentation

Sequential, diverging and qualitative colour scales from ColorBrewer

Description

Usage

scale_color_brewer(
    name = ['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);

Arguments

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

direction

Sets the order Of colours In the scale. If 1, the Default, colours are As output by RColorBrewer:brewer.pal(). If -1, the order of colours Is reversed. [as integer]

alpha

color alpha channel value between [0,1]. [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. Seehttps://colorbrewer2.orgfor 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]