Plots carbon dioxide data retrieved using get_carbon()
with ggplot2. The output ggplot2 object may be modified.
Usage
plot_carbon(dataset = get_carbon(), print = TRUE, annot = TRUE)
Details
plot_carbon
invisibly returns a ggplot2 object with a pre-defined carbon dioxide chart using data from get_carbon
.
By default the chart is also displayed. Users may further modify the output ggplot2 chart.
Author
Hernando Cortina, hch@alum.mit.edu
Examples
# \donttest{
# Fetch carbon dioxide data:
maunaloa <- get_carbon()
#
# Plot output using package's built-in ggplot2 defaults
plot_carbon(maunaloa)
# Or just call plot_carbon(), which defaults to get_carbon() dataset
plot_carbon()
p <- plot_carbon(maunaloa, print = FALSE)
# Modify plot such as: p + ggplot2::labs(title='The Keeling Curve') # }