plot_methane | R Documentation |
Plots atmospheric methane data retrieved using get_methane()
with ggplot2. The output ggplot2 object may be modified.
plot_methane(dataset = get_methane(), print = TRUE, annot = TRUE)
dataset |
Name of the tibble generated by |
print |
(boolean) Display methane 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_methane
invisibly returns a ggplot2 object with a pre-defined methane chart using data from get_methane
.
By default the chart is also displayed. Users may further modify the output ggplot2 chart.
Invisibly returns a ggplot2 object with methane chart
Hernando Cortina, hch@alum.mit.edu
# Fetch methane data:
ch4 <- get_methane()
#
# Plot output using package's built-in ggplot2 defaults
plot_methane(ch4)
# Or just call plot_methane(), which defaults to get_methane() dataset
plot_methane()
p <- plot_methane(ch4, print = FALSE)
# Modify plot such as: p + ggplot2::labs(title='Trend in Atmospheric Methane')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.