Generate a spatial surface plot based on interpolated values
Source:R/utils_shapefile.R
shapefile_surface.Rd
This function creates a surface plot from an interpolated spatial model, with options to customize plot appearance, grid resolution, and color palette.
Usage
shapefile_surface(
model,
curve = TRUE,
nx = 300,
ny = 300,
xlab = "Longitude (UTM)",
ylab = "Latitude (UTM)",
col = custom_palette(c("darkred", "yellow", "forestgreen"), n = 100),
...
)
Arguments
- model
An interpolated spatial object (e.g., from
shapefile_interpolate()
) containing the data for plotting.- curve
Logical; if TRUE, a contour plot is generated (
type = "C"
), otherwise an image plot (type = "I"
). Default is TRUE.- nx
Integer; the number of grid cells in the x-direction. Default is 300.
- ny
Integer; the number of grid cells in the y-direction. Default is 300.
- xlab
Character; label for the x-axis. Default is "Longitude (UTM)".
- ylab
Character; label for the y-axis. Default is "Latitude (UTM)".
- col
A color palette function for the surface plot. Default is a custom palette from dark red to yellow to forest green.
- ...
Additional parameters to pass to
fields::surface
.