Takes an object of class Spatial*DataFrame
or STFDF
, and plots requested data columns using ggplot2
plot_spatial_or_ST(
newdata,
column_names,
map_layer = NULL,
subset_time = NULL,
palette = "Spectral",
plot_over_world = FALSE,
labels_from_coordnames = TRUE,
...
)# S4 method for STFDF
plot_spatial_or_ST(
newdata,
column_names,
map_layer = NULL,
subset_time = NULL,
palette = "Spectral",
plot_over_world = FALSE,
labels_from_coordnames = TRUE,
...
)
# S4 method for SpatialPointsDataFrame
plot_spatial_or_ST(
newdata,
column_names,
map_layer = NULL,
subset_time = NULL,
palette = "Spectral",
plot_over_world = FALSE,
labels_from_coordnames = TRUE,
...
)
# S4 method for SpatialPixelsDataFrame
plot_spatial_or_ST(
newdata,
column_names,
map_layer = NULL,
subset_time = NULL,
palette = "Spectral",
plot_over_world = FALSE,
labels_from_coordnames = TRUE,
...
)
# S4 method for SpatialPolygonsDataFrame
plot_spatial_or_ST(
newdata,
column_names,
map_layer = NULL,
subset_time = NULL,
palette = "Spectral",
plot_over_world = FALSE,
labels_from_coordnames = TRUE,
...
)
A list of ggplot
objects corresponding to the provided column_names
. This list can then be supplied to, for example, ggpubr::ggarrange()
.
an object of class Spatial*DataFrame
or STFDF
a vector of strings indicating the columns of the data to plot
(optional) a ggplot
layer or object to add below the plotted layer, often a map
(optional) a vector of times to be included; applicable only for STFDF
objects
the palette supplied to the argument palette
of scale_*_distiller()
. Alternatively, if palette
= "nasa", a vibrant colour palette is created using scale_*_gradientn()
logical; if TRUE
, coord_map("mollweide")
and draw_world
are used to plot over the world
logical; if TRUE
, the coordinate names of newdata
(i.e., coordnames(newdata)
) are used as the horizontal- and vertical-axis labels. Otherwise, generic names, s_1 and s_2, are used
optional arguments passed on to whatever geom is appropriate for the Spatial*DataFrame
or STFDF
object (geom_point
, geom_tile
, geom_raster
, or geom_polygon
)
## See example in the help file for FRK
Run the code above in your browser using DataLab