Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unneeded warning about colours #2289

Open
ThierryO opened this issue Aug 30, 2023 · 0 comments
Open

unneeded warning about colours #2289

ThierryO opened this issue Aug 30, 2023 · 0 comments

Comments

@ThierryO
Copy link

Running the code below return the plot with a warning about the number of colours.
This is not needed as I provided the full colour palette.

library(plotly)
colours <- c(
  "#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow", "#FF7F00", "red",
  "#7F0000"
)
x <- data.frame(
  id = factor(colours)
)
plot_ly(x) |>
  add_markers(x = ~id, y = ~id, color = ~id, marker = list(color = colours))
Warning messages:
1: In RColorBrewer::brewer.pal(N, "Set2") :
  n too large, allowed maximum for palette Set2 is 8
Returning the palette you asked for with that many colors

2: In RColorBrewer::brewer.pal(N, "Set2") :
  n too large, allowed maximum for palette Set2 is 8
Returning the palette you asked for with that many colors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant