dot-ggAddLegend: Add Legend to a ggplot2 Plot

.ggAddLegendR Documentation

Add Legend to a ggplot2 Plot

Description

Internal function. This function creates a suitable legend and returns it as a set of grobs, ready to be added to an existing plot.

Usage

.ggAddLegend(spectra, use.sym, leg.loc)

Arguments

spectra

An object of S3 class ChemoSpec::Spectra().

use.sym

Logical specifying if symbols will be used or not.

leg.loc

A list giving x, y coordinates, and a reference point.

Value

A grob containing the legend.

Author(s)

Bryan A. Hanson (DePauw University), Tejasvi Gupta.


ChemoSpecUtils documentation built on May 29, 2024, 3:12 a.m.