Skip to content

Commit 8617103

Browse files
authored
Merge pull request #1389 from ropensci/fix-colorscale
use equally spaced grid of values when generating colorscale
2 parents 9124570 + 910c58e commit 8617103

10 files changed

+10
-10
lines changed

R/plotly_build.R

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

tests/figs/colorbar/plotly-colorbar-expand.svg

+1-1
Loading

tests/figs/colorbar/plotly-colorbar-restrict.svg

+1-1
Loading

tests/figs/colorbar/plotly-colorbar-z-expand.svg

+1-1
Loading

tests/figs/colorbar/plotly-colorbar-z-restrict.svg

+1-1
Loading

tests/figs/colorbar/plotly-colorbar.svg

+1-1
Loading

tests/figs/plotly-color/plotly-color-scatterplot-color-numeric-custom.svg

+1-1
Loading

tests/figs/plotly-color/plotly-color-scatterplot-color-numeric.svg

+1-1
Loading

tests/figs/plotly/plotly-alpha-blending.svg

+1-1
Loading

tests/figs/subplot/plotly-subplot-geo-cartesian.svg

+1-1
Loading

0 commit comments

Comments
 (0)