Skip to content

Commit 353cd13

Browse files
committed
fixes #2559
1 parent b3f5a60 commit 353cd13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/plot.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ plot.sfg = function(x, ...) {
606606
#' @param bgMap object of class \code{ggmap}, or returned by function \code{RgoogleMaps::GetMap}
607607
#' @param expandBB numeric; fractional values to expand the bounding box with,
608608
#' in each direction (bottom, left, top, right)
609-
#' @param graticule logical, or object of class \code{crs} (e.g., \code{st_crs(4326)} for a WGS84 graticule), or object created by \link{st_graticule}; \code{TRUE} will give the WGS84 graticule
609+
#' @param graticule logical, or object of class \code{crs} (e.g., \code{st_crs('OGC:CRS84')} for a WGS84 graticule), or object created by \link{st_graticule}
610610
#' or object returned by \link{st_graticule}
611611
#' @param col_graticule color to used for the graticule (if present)
612612
#' @export
@@ -657,9 +657,9 @@ plot_sf = function(x, xlim = NULL, ylim = NULL, asp = NA, axes = FALSE, bgc = pa
657657
rect(xleft = pl_reg[1], ybottom = pl_reg[3], xright = pl_reg[2],
658658
ytop = pl_reg[4], col = bgc, border = FALSE)
659659
linAxis = function(side, ..., lon, lat, ndiscr, reset, at) axis(side = side, ...)
660-
if (! missing(graticule)) {
660+
if (!missing(graticule) && !identical(graticule, FALSE)) {
661661
g = if (isTRUE(graticule))
662-
st_graticule(pl_reg[c(1,3,2,4)], st_crs(x), st_crs(4326), ...)
662+
st_graticule(pl_reg[c(1,3,2,4)], st_crs(x), st_crs('OGC:CRS84'), ...)
663663
else if (inherits(graticule, "crs") && !is.na(graticule))
664664
st_graticule(pl_reg[c(1,3,2,4)], st_crs(x), graticule, ...)
665665
else

0 commit comments

Comments
 (0)