powered by
Pair plots of layers in a SpatRaster. This is a wrapper around graphics function pairs.
pairs
# S4 method for SpatRaster pairs(x, hist=TRUE, cor=TRUE, use="pairwise.complete.obs", maxcells=100000, ...)
SpatRaster
logical. If TRUE a histogram of the values is shown on the diagonal
logical. If TRUE the correlation coefficient is shown in the upper panels
argument passed to the cor function
cor
integer. Number of pixels to sample from each layer of large Raster objects
additional arguments (graphical parameters)
boxplot, hist
# NOT RUN { r <-rast(system.file("exdata/test.tif", package="terra")) s <- c(r*1, 1/r, sqrt(r)) pairs(s) # to make indvidual histograms: hist(r) # or scatter plots: plot(r, 1/r) # }
Run the code above in your browser using DataLab