Skip to content

Commit 19fe782

Browse files
committed
r
1 parent d8a493f commit 19fe782

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/plot_2rasters.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
.scatterPlotRaster <- function(x, y, maxcell=100000, warn=TRUE, cex, xlab, ylab, nc, nr,
88
maxnl=16, main, add=FALSE, smooth=FALSE, gridded=FALSE, ncol=25, nrow=25, asp=NA,
9-
colramp=grDevices::colorRampPalette(c("white", grDevices::blues9)), ...) {
9+
ramp=grDevices::colorRampPalette(c("white", grDevices::blues9)), ...) {
1010

1111
compareGeom(x, y, lyrs=FALSE, crs=FALSE, warncrs=FALSE, ext=TRUE, rowcol=TRUE, res=FALSE)
1212
nlx <- nlyr(x)
@@ -67,7 +67,7 @@
6767
dots <- list(...)
6868
if (!is.null(dots$col)) {
6969
if (is.function(dots$col)) {
70-
colramp <- grDevices::colorRampPalette(dots$col)
70+
ramp <- grDevices::colorRampPalette(dots$col)
7171
} else {
7272
warn("plot<SpatRaster,SpatRaster>", "when smooth=TRUE, col must be a function")
7373
}
@@ -118,7 +118,7 @@
118118

119119
if (smooth) {
120120
for (i in 1:nl) {
121-
graphics::smoothScatter(x[,i], y[,i], main=main[i], xlab=ln1[i], ylab=ln2[i], add=add, asp=asp, colramp=colramp, ...)
121+
graphics::smoothScatter(x[,i], y[,i], main=main[i], xlab=ln1[i], ylab=ln2[i], add=add, asp=asp, colramp=ramp, ...)
122122
}
123123
} else if (gridded) {
124124
for (i in 1:nl) {
@@ -137,7 +137,7 @@
137137
}
138138
} else {
139139
if (smooth) {
140-
graphics::smoothScatter(x, y, main=main[1], xlab=ln1[1], ylab=ln2[1], add=add, asp=asp, colramp=colramp, ...)
140+
graphics::smoothScatter(x, y, main=main[1], xlab=ln1[1], ylab=ln2[1], add=add, asp=asp, colramp=ramp, ...)
141141
} else if (gridded) {
142142
.plotdens(x, y, nc=ncol, nr=nrow, main=main[1], xlab=ln1[1], ylab=ln2[1], add=add, asp=asp, ...)
143143
} else {

0 commit comments

Comments
 (0)