plotly/plotly.R

Trivial RColorBrewer warning

HenningLorenzen-ext-bayer opened this issue · 2 comments

Warning message from {RColorBrewer} can be confusing. Is this something the average {plotly} user should be concerned with and work around in his own code?

Seems to be related to #2289.

library(plotly)
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
plot_ly(mtcars) |> add_boxplot(y = ~ mpg, x = ~ am, color = ~ as.factor(am))
#> Warning in RColorBrewer::brewer.pal(N, "Set2"): minimal value for n is 3, returning requested palette with 3 different levels
#> Warning in RColorBrewer::brewer.pal(N, "Set2"): minimal value for n is 3, returning requested palette with 3 different levels

Created on 2024-09-18 with reprex v2.1.1

#1999 would solve this issue