Skip to content

Commit b733fba

Browse files
committed
skip viewscales for empty graticules
1 parent 5971ff4 commit b733fba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/coord-sf.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,9 @@ sf_breaks <- function(scale_x, scale_y, bbox, crs) {
658658
#' @keywords internal
659659
view_scales_from_graticule <- function(graticule, scale, aesthetic,
660660
label, label_graticule, bbox) {
661+
if (empty(graticule)) {
662+
return(ggproto(NULL, ViewScale))
663+
}
661664

662665
# Setup position specific parameters
663666
# Note that top/bottom doesn't necessarily mean to label the meridians and

0 commit comments

Comments
 (0)