Categories
Mastering Development

Separate colour mappings in R plotly

I’ve got two layers of markers for which I’d like to use separate colour mappings. The problem is that the second add_marker inherits the palette from the first one. Is there anything like ggnewscale::new_scale_color() in native plotly? require(plotly) df = data.frame(x = runif(10), y = runif(10), m = runif(10), b = round(runif(10))) plot_ly(data = df, […]