| bbox_set | R Documentation |
bbox_setchanges the bounding box in an plotdap object.
Particularly needed if using gganimate::animate()
bbox_set(
plotobj,
landmask = TRUE,
xlim = NULL,
ylim = NULL,
interactive = FALSE
)
plotobj |
valid plotdap object |
landmask |
optional: if true land is plotted over the data |
xlim |
optional: new x-values of the bounding box otherwise taken from the plotdap object |
ylim |
optional: new y-values of the bounding box otherwise taken from the plotdap object |
interactive |
optional: if true creates an interactive version of the graphic |
a ggplot object with reset limits. If interactive is true, then returns a ggplot object that will work with the 'plotly' package.
p <- plotdap()
p <- add_tabledap(p, sardines, ~subsample_count)
xlim = c(-125, -115)
ylim <- c(30., 50.)
p <- bbox_set(p, xlim = xlim, ylim = ylim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.