Skip to content

Commit

Permalink
fix: allow to plot non overlapping labels from a layer made of strict…
Browse files Browse the repository at this point in the history
…ly overlapping features

fix #65
  • Loading branch information
rCarto committed Mar 4, 2024
1 parent dfa96c3 commit 52135ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/mf_labels_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ wordlayout <- function(x, y, words, cex = 1, q) {
n <- length(words)
sdx <- sd(x, na.rm = TRUE)
sdy <- sd(y, na.rm = TRUE)
if (sdx == 0) sdx
if (sdy == 0) sdy
if (sdx == 0) sdx <- 1
if (sdy == 0) sdy <- 1
if (length(cex) == 1) cex <- rep(cex, n)
boxes <- list()
for (i in seq_along(words)) {
Expand Down

0 comments on commit 52135ca

Please sign in to comment.