plot.openaq_locations_data.frame: Helper for plotting locations on map.

View source: R/locations.R

plot.openaq_locations_data.frameR Documentation

Helper for plotting locations on map.

Description

Plots location coordinates. If the maps package is installed, a world boundary overlay is added. Install with install.packages("maps").

Usage

## S3 method for class 'openaq_locations_data.frame'
plot(x, y = NULL, ...)

Arguments

x

the coordinates of points in the plot. Alternatively, a single plotting structure, function or any R object with a plot method can be provided.

y

the y coordinates of points in the plot, optional if x is an appropriate structure.

...

Other options passed on to base::plot().

Value

Called for its side effect of producing a plot. Returns NULL invisibly.

Examples


df <- list_locations(limit = 100)
plot(df, pch = 19, col = df$provider_name)


openaq documentation built on March 19, 2026, 5:08 p.m.