Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Dec 3, 2024
1 parent e6dde00 commit e0db696
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 0 additions & 5 deletions R/geom.R
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,6 @@ setMethod("split", signature(x="SpatVector", f="SpatVector"),
}
values(f) <- NULL
ex <- ext(x)
i <- intersect(ext(x), ext(f))
if (is.null(i)) {
warn("split", "x and f do not intersect")
return(x)
}
r <- relate(x, f, "intersects")
if (sum(r) == 0) {
warn("split", "x and f do not intersect")
Expand Down
4 changes: 3 additions & 1 deletion R/plot_let.R
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ make.panel <- function(x, maxcell) {

setMethod("plet", signature(x="SpatRaster"),
function(x, y=1, col, alpha=0.8, main=names(x), tiles=c("Streets", "Esri.WorldImagery", "OpenTopoMap"),
wrap=TRUE, maxcell=500000, stretch=NULL, legend="bottomright", shared=FALSE, panel=FALSE, collapse=TRUE, type=NULL, breaks=NULL, breakby="eqint", sort=TRUE, decreasing=FALSE, map=NULL) {
wrap=TRUE, maxcell=500000, stretch=NULL, legend="bottomright", shared=FALSE, panel=FALSE, collapse=TRUE,
# type=NULL, breaks=NULL, breakby="eqint", sort=TRUE, decreasing=FALSE,
map=NULL) {

#checkLeafLetVersion()

Expand Down
5 changes: 4 additions & 1 deletion R/sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,10 @@ sampleRaster <- function(x, size, method, replace, ext=NULL, warn) {
# hasWin <- TRUE
# hadWin <- window(x)
# oldWin <- ext(x)
w <- intersect(ext(x), ext(ext))
w <- intersect(ext(x), ext(ext))
if (is.null(w)) {
error("sampleRaster", "x and ext do not intersect")
}
x <- deepcopy(x)
window(x) <- w
}
Expand Down
4 changes: 2 additions & 2 deletions man/plot.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ plot(r, type="interval")

e <- c(6.37, 6.41, 49.9, 50.1)
plot(r, plg=list(ext=e, title="Legend\nTitle", title.cex=0.9),
pax=list(side=1:4, retro=TRUE))
pax=list(side=1:4, retro=FALSE))
north(cbind(5.8, 50.1))

d <- classify(r, c(100,200,300,400,500,600))
Expand All @@ -143,7 +143,7 @@ par(mfrow=c(1,2))
plot(r, range=c(50,600), mar=c(1,1,1,4))
plot(r/2, range=c(50,600), mar=c(1,1,1,4))

# as we only need one legend:
# as we only need one legend:
par(mfrow=c(1,2))
plot(r, range=c(50,600), mar=c(2, 2, 2, 2), plg=list(size=0.9, cex=.8),
pax=list(side=1:2, cex.axis=.6), box=FALSE)
Expand Down

0 comments on commit e0db696

Please sign in to comment.