Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scatter

Scatterplot of two SpatRaster layers


Description

Scatterplot of the values of two SpatRaster layers

Usage

## S4 method for signature 'SpatRaster,SpatRaster'
plot(x, y, maxcell=100000, warn=TRUE, nc, nr, 
   maxnl=16, gridded=FALSE, ncol=25, nrow=25, ...)

Arguments

x

SpatRaster

y

SpatRaster

maxcell

positive integer. Maximum number of cells to use for the plot

nc

positive integer. Optional. The number of columns to divide the plotting device in (when plotting multiple layers)

nr

positive integer. Optional. The number of rows to divide the plotting device in (when plotting multiple layers)

maxnl

positive integer. Maximum number of layers to plot (for multi-layer objects)

gridded

logical. If TRUE the scatterplot is gridded (counts by cells)

warn

boolean. Show a warning if a sample of the pixels is used (for scatterplot only)

ncol

positive integer. Number of columns for gridding

nrow

positive integer. Number of rows for gridding

...

additional graphical arguments

Examples

s <- rast(system.file("ex/logo.tif", package="terra"))   
plot(s[[1]], s[[2]])
plot(s, sqrt(s[[3:1]]))

terra

Spatial Data Analysis

v1.2-10
GPL (>= 3)
Authors
Robert J. Hijmans [cre, aut] (<https://orcid.org/0000-0001-5872-2872>), Roger Bivand [ctb] (<https://orcid.org/0000-0003-2392-6140>), Karl Forner [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Edzer Pebesma [ctb] (<https://orcid.org/0000-0001-8049-7069>)
Initial release
2021-05-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.