Plots the global mean sea level data retrieved using get_sealevel()
with ggplot2. The output ggplot2 object may be further modified.
Usage
plot_sealevel(dataset = get_sealevel(), print = TRUE)
Details
plot_sealevel
invisibly returns a ggplot2 object with a pre-defined sealevel change chart using data from get_sealevel
.
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 sealevel data:
gmsl <- get_sealevel()
#> Retrieving remote data requires internet connectivity.
#
# Plot output using package's built-in ggplot2 defaults
plot_sealevel(gmsl)
# Or just call plot_sealevel(), which defaults to get_sealevel() dataset
plot_sealevel()
#> Retrieving remote data requires internet connectivity.
p <- plot_sealevel(gmsl, print = FALSE)
# Modify plot such as: p + ggplot2::labs(title='Rising Waters') # }