powered by
Custon plot for SpatRaster (terra R-package) object based on terra package
plot_rast( r, color, ncolor = 21, proj = FALSE, plg = list(tic = "none", shrink = 1), pax = list(), latitude = TRUE, longitude = TRUE, int = 10, grid = FALSE, grid_int = int, grid_col = "#666666", add_range = FALSE, ndig = 2, log = FALSE, range, min = -3, max, unit, ... )
No return value
raster
color scale, or name of a custom color scale (see notes)
number of colors
TRUE to project the raster to lat-lon
list of parameters passed to terra::add_legend
list of parameters passed to graphics::axis
add a latitude axis
add a longitude axis
interval of latitude and longitude lines
add grid (graticule style)
interval of grid lines
color for grid lines
add legend with max, average and min r values
number of digits for legend_range
TRUE to plot in log-scale
range of original values to plot
minimum log value for log scale (defoul is -3)
maximum log value for log scale
title for color bar (defoult is )
arguments to be passing to terra::plot
wrf <- paste(system.file("extdata", package = "eva3dm"), "/wrfinput_d01", sep="") r <- wrf_rast(file=wrf, name='XLAT') plot_rast(r)
Run the code above in your browser using DataLab