I have a basic subplot with two graphs, both have a legend by default, but I want to see only one of them.
I tried this :
require(plotly) p1 <- pl
Maybe you can try a simple method. (plotly 4.9.2)
(plotly 4.9.2)
subplot(style(p1, showlegend = F), p2)
It will just show the legend of p2. Hope this works.