We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a3a1941 + f9b623e commit 4d83031Copy full SHA for 4d83031
1 file changed
tests/testthat/test-plotly-color.R
@@ -29,7 +29,8 @@ test_that("Custom RColorBrewer pallette works for factor variable", {
29
l <- expect_traces(p, 3, "scatterplot-color-factor-custom")
30
markers <- lapply(l$data, "[[", "marker")
31
colz <- unlist(lapply(markers, "[[", "color"))
32
- expect_identical(sort(colsToCompare[c(1, 5, 9)]), sort(colz))
+ idx <- if (packageVersion("scales") > '1.0.0') c(1, 2, 3) else c(1, 5, 9)
33
+ expect_identical(sort(colsToCompare[idx]), sort(colz))
34
# providing vector of RGB codes should also work
35
p <- plot_ly(iris, x = ~Sepal.Length, y = ~Petal.Length, color = ~Species,
36
colors = cols[1:3])
0 commit comments