Skip to content

Trivial RColorBrewer warning #2392

Closed
Closed

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

Activity

  1. romanzenka commented on Feb 21, 2025

    @romanzenka

    #1999 would solve this issue

  2. ethanbass commented on May 17, 2025

    @ethanbass

    I would be happy to see this merged! These warnings do not seem useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions