Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels