Learn R Programming

GiNA (version 1.0.1)

brewer.pal: Generate a sequence of colors for groups.

Description

wrapper of brewer.pal function from RColorBrewer.

Usage

brewer.pal(n, name)

Arguments

n
Number of different colors in the palette, minimum 3, maximum depending on palette.
name
A palette name from the lists below.

Value

A vector of colors.

Examples

Run this code
{
# Plot a colorbar with brewer.pal
mypalette<-brewer.pal(7,"Greens")
}

Run the code above in your browser using DataLab