This function creates a surface plot from an interpolated spatial model, with options to customize plot appearance, grid resolution, and color palette.
shapefile_surface(
model,
curve = TRUE,
nx = 300,
ny = 300,
xlab = "Longitude (UTM)",
ylab = "Latitude (UTM)",
col = custom_palette(c("darkred", "yellow", "forestgreen"), n = 100),
...
)
A surface plot showing spatially interpolated data.
An interpolated spatial object (e.g., from shapefile_interpolate()
) containing the data for plotting.
Logical; if TRUE, a contour plot is generated (type = "C"
), otherwise an image plot (type = "I"
). Default is TRUE.
Integer; the number of grid cells in the x-direction. Default is 300.
Integer; the number of grid cells in the y-direction. Default is 300.
Character; label for the x-axis. Default is "Longitude (UTM)".
Character; label for the y-axis. Default is "Latitude (UTM)".
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
.