plot_carbon | R Documentation |
Plots carbon dioxide data retrieved using get_carbon()
with ggplot2. The output ggplot2 object may be modified.
plot_carbon(dataset = get_carbon(), print = TRUE, annot = TRUE)
dataset |
Name of the tibble generated by |
print |
(boolean) Display carbon dioxide ggplot2 chart, defaults to TRUE. Use FALSE to not display chart. |
annot |
(boolean) Include chart annotation with latest date and value, defaults to TRUE. |
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.
Invisibly returns a ggplot2 object with carbon dioxide chart
Hernando Cortina, hch@alum.mit.edu
# 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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.