title: R Plotly legend filtering
body: <p>I have copypasted the code example from plotly website (<a href="https://plot.ly/ggplot2/geom_bar" rel="nofollow noreferrer">https://plot.ly/ggplot2/geom_bar</a>), but the graph behave differently from the example when filtered; how can I have mine to be able to reshape like that?</p>
  
  <p>code:</p>
  
  <pre><code>library(plotly)
  
  DF &lt;- read.table(text="Rank F1     F2     F3
  1    500    250    50
  2    400    100    30
  3    300    155    100
  4    200    90     10", header=TRUE)
  
  library(reshape2)
  DF1 &lt;- melt(DF, id.var="Rank")
  
  p &lt;- ggplot(DF1, aes(x = Rank, y = value, fill = variable)) +
    geom_bar(stat = "identity")
  
  p &lt;- ggplotly(p)
  </code></pre>
  
  <p>From the web:
  <a href="https://i.stack.imgur.com/HWV1G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HWV1G.png" alt="Plotly website"></a>
  <br>
  My RStudio Viewer:
  <br></p>
  
  <p><a href="https://i.stack.imgur.com/BvrrO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BvrrO.png" alt="R Studio Viewer"></a></p>