plot.tag | R Documentation |
tag
objectThis function plot a GeoPressureR tag
object as a time series or a map.
By default, type
is determined in the following order of preference according to availability:
c("map_pressure", "map_light")
, "map_pressure"
, "map_light"
, "pressure"
.
plot.tag()
calls different plotting functions depending on type
.
"pressure"
: plot_tag_pressure()
"light"
: plot_tag_light()
"acceleration"
: plot_tag_acceleration()
"temperature"
: plot_tag_temperature()
"twilight"
: plot_tag_twilight()
"map_*"
: plot.map()
with tag$map_*
as first argument.
Refers to these functions for additional parameters and more flexibility in the plotting.
## S3 method for class 'tag'
plot(x, type = NULL, ...)
x |
a GeoPressureR |
type |
type of the plot to display. One of |
... |
additional parameters for |
a plot, ggplotly or leaflet object.
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |>
tag_label(quiet = TRUE) |>
twilight_create() |>
twilight_label_read()
})
# By default, plot will display the time series of pressure
plot(tag)
# Change the `type` to display other sensor
plot(tag, type = "acceleration")
plot(tag, type = "light")
# Twilight is display as an image
plot(tag, type = "twilight")
# After you compute any likelihood map, the default will
# become this map (i.e., `type = "map"`)
tag <- tag_set_map(tag,
extent = c(-16, 23, 0, 50),
scale = 4,
known = data.frame(
stap_id = 1,
known_lon = 17.05,
known_lat = 48.9
)
) |>
geopressure_map(quiet = TRUE)
plot(tag)
# The likelihood map of light can be display with
tag <- geolight_map(tag, quiet = TRUE)
plot(tag, type = "map_light")
# When both pressure and light likelihood are present,
# the default is to display their products, equivalent
# to choose `type = c("map_pressure", "map_light")`
plot(tag)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.