Skip to content

Commit 860bfa4

Browse files
committed
use equally spaced grid of values when generating colorscale, closes #1308
1 parent 05ec84b commit 860bfa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/plotly_build.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ map_color <- function(traces, stroke = FALSE, title = "", colorway, na.color = "
775775
colScale <- scales::col_numeric(pal, rng, na.color = na.color)
776776
# generate the colorscale to be shared across traces
777777
vals <- if (diff(rng) > 0) {
778-
as.numeric(stats::quantile(allColor, probs = seq(0, 1, length.out = 25), na.rm = TRUE))
778+
seq(rng[1], rng[2], length.out = 25)
779779
} else {
780780
c(0, 1)
781781
}

0 commit comments

Comments
 (0)