Skip to content

Trivial RColorBrewer warning #2392

@HenningLorenzen-ext-bayer

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions