A plotting function that uses ggplot2 to display multiple
ggplot objects in a single pane. Can either be passed individual ggplot
objects OR a pat object and a plot type.
Typical usage would be to supply pat
and use the plottype
argument to quickly display preformatted plots.
Available plottype
options include:
"all"
-- pm25_A, pm25_B, temperature, humidity
"pm25_a"
-- PM2.5 from channel A only
"pm25_b"
-- PM2.5 from channel B only
"pm25"
-- PM2.5 from channels A and B in separate plots
"pm25_over"
-- PM2.5 from channels A and B in the same plot
"aux"
-- auxiliary data (temperature, humidity)
pat_multiPlot(
pat = NULL,
plottype = "all",
sampleSize = 5000,
columns = NULL,
ylim = NULL,
a_size = 1,
a_shape = 15,
a_color = rgb(0.9, 0.25, 0.2),
b_size = 1,
b_shape = 15,
b_color = rgb(0.2, 0.25, 0.9),
t_size = 1,
t_shape = 15,
t_color = "black",
h_size = 1,
h_shape = 15,
h_color = "black",
alpha = 0.5,
timezone = NULL
)pat_multiplot(
pat = NULL,
plottype = "all",
sampleSize = 5000,
columns = NULL,
ylim = NULL,
a_size = 1,
a_shape = 15,
a_color = rgb(0.9, 0.25, 0.2),
b_size = 1,
b_shape = 15,
b_color = rgb(0.2, 0.25, 0.9),
t_size = 1,
t_shape = 15,
t_color = "black",
h_size = 1,
h_shape = 15,
h_color = "black",
alpha = 0.5,
timezone = NULL
)
PurpleAir Timeseries pat object.
Quick-reference plot types: "all", "aux", "pm25".
Either an integer or fraction to determine sample size.
Number of columns in the plot layout. Use NULL
for
defaults.
Vector of (lo,hi) y-axis limits.
Size of pm25_A points.
Symbol to use for pm25_A points.
Color of pm25_A points.
Size of pm25_B points.
Symbol to use for pm25_B points.
Color of pm25_B points.
Size of temperature points.
Symbol to use for temperature points.
Color of temperature points.
Size of humidity points.
Symbol to use for humidity points.
Color of humidity points.
Opacity of points.
Olson timezone used for the time axis. (Defaults to
pat
local time.)
A ggplot object.
# NOT RUN {
library(AirSensor)
example_pat %>%
pat_multiPlot(plottype = "pm25", alpha = 0.5)
# }
Run the code above in your browser using DataLab