Skip to content

Commit

Permalink
Fix partial match
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Mar 28, 2024
1 parent 3d342aa commit 8f3afb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/misc_pointLabel.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pointLabel2 <- function (x, y, width, height, bbx,
rectv <- width + (0+1i) * height
rectidx1 <- rectidx2 <- array(0, (length(x)^2 - length(x))/2)
k <- 0
for (i in 1:length(x)) for (j in seq(len = (i - 1))) {
for (i in 1:length(x)) for (j in seq_len(i - 1)) {
k <- k + 1
rectidx1[k] <- i
rectidx2[k] <- j
Expand Down
4 changes: 2 additions & 2 deletions R/tmapChart.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ bin_num = function(x1, breaks_def, chart) {
# are breaks (and bin_colors)
predefined = !is.null(breaks_def)

if (is.null(chart$breaks)) {
if (is.null(chart$breaks_def)) {
if (!predefined) {
breaks = pretty(x1)
ids = rep(1L, length(breaks) - 1)
Expand All @@ -112,7 +112,7 @@ bin_num = function(x1, breaks_def, chart) {
ids = 1L:(length(breaks) - 1L)
}
} else {
breaks = chart$breaks
breaks = chart$breaks_def
subbreaks = (all(breaks_def %in% breaks))

break_mids = (breaks[-1] + head(breaks, -1)) / 2
Expand Down

0 comments on commit 8f3afb2

Please sign in to comment.