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.
addAQILegend(x = "topright", y = NULL, col = rev(AQI$colors),
legend = rev(AQI$names), pch = 16, title = "Air Quality Index",
...)
x coordinate passed on to the legend()
command
y coordinate passed on to the legend()
command
the color for points/lines in the legend
a character vector to be shown in the legend
plotting symbols in the legend
title for the legend
additional arguments to be passed to legend()