View source: R/stat_AQCategory.R
stat_AQCategory | R Documentation |
This function calculates the air quality categories for the data and colors the data by AQ cateogry when it is added to a plot. The default is to add them as bars.
stat_AQCategory(
mapping = NULL,
data = NULL,
mv4Colors = FALSE,
nowcast = TRUE,
geom = "bar",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options:
if |
mv4Colors |
If |
nowcast |
If |
geom |
The geometic object to display the data |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
na.rm |
remove NA values from data |
show.legend |
logical indicating whether this layer should be included in legends. |
inherit.aes |
if |
... |
additional arguments passed on to |
ggplot_pm25Timeseries(
AirMonitor::Carmel_Valley,
startdate = 20160801,
enddate = 20160815
) +
stat_AQCategory()
ggplot_pm25Timeseries(
AirMonitor::Carmel_Valley,
startdate = 20160801,
enddate = 20160805
) +
geom_line() +
stat_AQCategory(
geom = "point",
size = 2,
shape = 21,
color = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.