Skip to content

Commit 2d1f31c

Browse files
authored
Do not make more than 10k points for a line (#5644)
1 parent 26de56e commit 2d1f31c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/coord-munch.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ munch_data <- function(data, dist = NULL, segment_length = 0.01) {
6161
}
6262

6363
# How many endpoints for each old segment, not counting the last one
64-
extra <- pmax(floor(dist / segment_length), 1)
64+
extra <- pmin(pmax(floor(dist / segment_length), 1), 1e4)
6565
extra[is.na(extra)] <- 1
6666
# Generate extra pieces for x and y values
6767
# The final point must be manually inserted at the end

0 commit comments

Comments
 (0)