Skip to content

Commit 63d250c

Browse files
committed
fix size modifier for geom hex
1 parent 9bd9940 commit 63d250c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/layers2traces.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ to_basic.GeomHex <- function(data, prestats_data, layout, params, ...) {
241241
dy <- resolution(data$y, FALSE)/sqrt(3)/2 * 1.15
242242
hexC <- hexbin::hexcoords(dx, dy, n = 1)
243243
n <- nrow(data)
244-
data$size <- ifelse(data$size < 1, data$size ^ (1 / 6), data$size ^ 2)
244+
data$size <- ifelse(data$size < 1, data$size ^ (1 / 6), data$size ^ 6)
245245
x <- rep.int(hexC$x, n) * rep(data$size, each = 6) + rep(data$x, each = 6)
246246
y <- rep.int(hexC$y, n) * rep(data$size, each = 6) + rep(data$y, each = 6)
247247
data <- data[rep(seq_len(n), each = 6), ]

0 commit comments

Comments
 (0)