Create a plot using ggplot with default mappings and styling. Layers can then be added to this plot using ggplot2 syntax.

ggplot_pm25Timeseries(
  monitor,
  startdate = NULL,
  enddate = NULL,
  timezone = NULL,
  ylim = NULL,
  base_size = 11,
  ...
)

Arguments

monitor

Monitoring data object to use when adding layers. Must be of class mts_monitor or mts_tidy.

startdate

Desired start date (integer or character in ymd format or POSIXct).

enddate

Desired end date (integer or character in ymd format or POSIXct).

timezone

Timezone for x-axis scale. If NULL and only one timezone present in monitor, that timezone will be used. If NULL and multiple timezones present, the default is UTC.

ylim

custom y-axis limits. This function will apply a default limit depending on the data.

base_size

Base font size for theme.

...

Additional arguments passed on to custom_datetimeScale.

Examples

library(AirMonitorPlots)

AirMonitor::Carmel_Valley %>%
  ggplot_pm25Timeseries() +
  geom_point(shape = "square", alpha = .4)
#> Warning: Removed 9 rows containing missing values or values outside the scale range
#> (`geom_point()`).