One or two months ago, when creating subplots, Plotly automatically assigned different colors to the different plots. Now it doesn’t do that any more. Every plot has the same color. See the first example in the tutorial about subplots:
p1 <- plot_ly(economics, x = ~date, y = ~unemploy) %>%
add_lines(name = ~“unemploy”)
p2 <- plot_ly(economics, x = ~date, y = ~uempmed) %>%
add_lines(name = ~“uempmed”)
Both graphs are printed in blue, which is not ideal. Before, and in the tutorial example, one graph was printed in blue, the other in orange.
Is that due to a new release? How can I make sure that different colors are assigned automatically, just as they were before?
***** Update: ****
Note also the difference between the help center and the tutorial “plotly for r”:
- In the help center (https://plot.ly/r/subplots/) the two graphs with the economic data are in different color
- In the tutorial (https://cpsievert.github.io/plotly_book/merging-plotly-objects.html) the exact same code results in the two graphs having the same color, resulting in a confusing legend.
Is this a bug or do I make a mistake? If it’s a feature: how can I create the subplots in different colors?