gg_palette: [!.] Add color palette to 'ggplot'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/gg_palette.R

Description

[!.] Add color palette to 'ggplot'

Usage

1
2
3

Arguments

obj

hyperSpec object.

palette

Color palette. Eithar a named or unnamed vector with colors, or data frame with variables $colors and labels (data frame is usually generated with function hyGet_palette0).

name

the main title of the legend.

...

further parameters to be passed to scale_color_manual and scale_fill_manual

Details

gg_palette adds color palette to ggplot object. It wraps two functions scale_color_manual and scale_fill_manual.

palette2vec converts dataframe with variables $colors and $labels to a named vector, were $labels are the names and $colors are the values.The data frame is usually generated with function hyGet_palette0.

Value

Updated ggplot2 object of class ggplot.

Author(s)

Vilmantas Gegzna

See Also

Other spPlot functions for spectroscopy and hyperSpec: facet_wl(), ggLims(), ggplot.hyperSpec(), label_expr2text()

Other spPlot functions for ggplot2: facet_wl(), ggLims(), ggplot.hyperSpec(), nTick

Examples

1
## NO EXAMPLES YET ##

GegznaV/spPlot documentation built on April 29, 2020, 11:06 p.m.