Learn R Programming

sits (version 1.2.0)

sits_colors: Function to handle colors in SITS

Description

Returns a color palette for plotting

Implements support RColorBrewer and named sits palettes. Valid names are: "veg_index", "probs", "uncert", "soil", "forest", "water", "green", "BuGn", "BuPu", "GnBu", "PuBu", "PuBuGn", "PuRd", "YlGn", "YlGnBu", "YlOrRd", "YlOrBr", "OrRd", "Blues", "Greens", "Oranges", "Reds", "Greys", "Purples".

Usage

sits_colors(name, n_colors = 32)

Value

A vector with valid R colors

Arguments

name

Name of sits color palette

n_colors

Number of colors to be displayed

Author

Gilberto Camara, gilberto.camara@inpe.br

Examples

Run this code
if (sits_run_examples()) {
    # show the names of the colors supported by SITS
    sits_color_names()
    # show a color palette
    sits_colors_show("Blues", n_colors = 16)
}

Run the code above in your browser using DataLab