Skip to contents

This function plots the interpolated LCZ anomaly, LCZ air temperature, or other environmental variables.

Usage

lcz_plot_interp(
  x,
  palette = "muted",
  direction = 1,
  ncol = NULL,
  nrow = NULL,
  isave = FALSE,
  save_extension = "png",
  ...
)

Arguments

x

The LCZ map in SpatRaster format, either as a single raster or a raster stack, obtained from functions like lcz_anomaly_map() or lcz_interp_map().

palette

Gradient palettes available in the tidyterra package. Default is "muted". More palettes can be found in the tidyterra documentation: https://dieghernan.github.io/tidyterra/articles/palettes.html#scale_fill_whitebox_

direction

Sets order of colors. Default palette is 1. If direction is -1, palette color order is reversed

ncol

Number of columns in the plot.

nrow

Number of rows in the plot.

isave

Logical, indicating whether to save the plot to your directory. Default is FALSE.

save_extension

File format for saving the plot. Options: "png", "jpg", "jpeg", "tif", "pdf", "svg" (default is "png").

...

Additional arguments to modify axis, legend, and plot labels, including title, subtitle, and caption.

Value

A plot of the LCZ interpolated map in ggplot2 format.

See also

See the documentation for lcz_anomaly_map() to obtain LCZ anomaly rasters and lcz_interp_map() for air temperature rasters.

Examples

if (FALSE) { # \dontrun{
 # Interpol your air temperature
 lcz_plot_interp(my_interp_map)
 } # }