Skip to content

Commit a0ead6f

Browse files
committed
Fix geom_sf() break positions
1 parent 6b5395d commit a0ead6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/ggplotly.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,9 @@ gg2list <- function(p, width = NULL, height = NULL,
668668
"\\*\\s+degree[ ]?[\\*]?", "&#176;",
669669
gsub("\"", "", tickData[["degree_label"]])
670670
)
671-
rng[[paste0(xy, ".major")]] <- tickData[[paste0(xy, "_start")]]
671+
rng[[paste0(xy, ".major")]] <- scales::rescale(
672+
tickData[[paste0(xy, "_start")]]
673+
)
672674

673675
# If it doesn't already exist (for this panel),
674676
# generate graticule (as done in, CoordSf$render_bg)

0 commit comments

Comments
 (0)