Skip to content

Commit 4e2481d

Browse files
committed
fallback
1 parent e16ae8b commit 4e2481d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

R/coord-sf.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,14 @@ view_scales_from_graticule <- function(graticule, scale, aesthetic,
721721
accept_start <- graticule[[orth_start]] < thres
722722
accept_end <- graticule[[orth_end]] < thres
723723
}
724+
if (!any(accept_start | accept_end)) {
725+
eps <- sqrt(.Machine$double.xmin)
726+
subtract <- switch(position, top = , bottom = 90, 0)
727+
straight <-
728+
abs(graticule$angle_start - subtract) < eps &
729+
abs(graticule$angle_end - subtract) < eps
730+
accept_start <- accept_end <- straight
731+
}
724732

725733
# Parsing the information of the `label_axes` argument:
726734
# should we label the meridians ("E") or parallels ("N")?

0 commit comments

Comments
 (0)