Hide legend
hide_legend(p)
p
a plotly object.
hide_colorbar()
Run examples
p <- plot_ly(mtcars, x = ~wt, y = ~cyl, color = ~factor(cyl)) hide_legend(p)