Skip to content

Commit

Permalink
n
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Jan 9, 2024
1 parent 97b13da commit e8b66d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
- `layerCor` with a custom function did not work anymore [#1387](https://github.com/rspatial/terra/issues/1387) by Jakub Nowosad
- `plet` broke when using "panel=TRUE" [#1384](https://github.com/rspatial/terra/issues/1384) by Elise Hellwig
- using /vis3/ to open a SpatRaster did not work [#1382](https://github.com/rspatial/terra/issues/1382) by Mike Koontz
- `plot<SpatRaster>(add=TRUE)` sampled the raster data without considering the extent of the map. [#1394](https://github.com/rspatial/terra/issues/1394) by Márcia Barbosa


## enhancements

- `vect<character>` now has argument "opts" for GDAL open options, e.g. to declare a file encoding. [#1389](https://github.com/rspatial/terra/issues/1389) by Mats Blomqvist
- `plot(plg=list(tic=""))` now allows chosing alternative continuous legend tic-mark styles ("in", "out", "through" or "none")

## new

Expand Down
8 changes: 7 additions & 1 deletion R/plot_legend.R
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ retro_labels <- function(x, lat=TRUE) {
} else {
tics <- "throughout"
}

if (!is.null(x$leg$tic.box.col)) {
ticboxcol <- x$leg$tic.box.col
} else {
ticboxcol <- "black"
}

if (is.null(x$leg$x)) {
x$leg$x <- "right"
Expand Down Expand Up @@ -373,7 +379,7 @@ retro_labels <- function(x, lat=TRUE) {
text(xpos, e$ymax+e$dy*0.25, zztxt, pos=3, xpd=NA, cex=cex)
}
}
graphics::rect(e$xmin, e$ymin, e$xmax, e$ymax, border ="black", xpd=NA)
graphics::rect(e$xmin, e$ymin, e$xmax, e$ymax, border=ticboxcol, xpd=NA)


if (!is.null(x$leg$title)) {
Expand Down

0 comments on commit e8b66d9

Please sign in to comment.