addAQILegend: Add an AQI Legend to a Map

View source: R/addAQILegend.R

addAQILegendR Documentation

Add an AQI Legend to a Map

Description

This function is a convenience wrapper around graphics::legend(). It will show the AQI colors and names by default if col and legend are not specified.

Usage

addAQILegend(
  x = "topright",
  y = NULL,
  col = rev(AQI$colors),
  legend = rev(AQI$names),
  pch = 16,
  title = "Air Quality Index",
  ...
)

Arguments

x

x coordinate passed on to the legend() command

y

y coordinate passed on to the legend() command

col

the color for points/lines in the legend

legend

a character vector to be shown in the legend

pch

plotting symbols in the legend

title

title for the legend

...

additional arguments to be passed to legend()


MazamaScience/PWFSLSmoke documentation built on July 3, 2023, 11:03 a.m.