title: Duplicated legends when faceting in ggplotly
body: <p>I'm making some figures with <code>ggplotly()</code> and have noticed that <code>facet_wrap</code> and <code>facet_grid</code> causes each item in the legend to be repeated by the number of facets. Is there a way to stop this? </p>
  
  <p>For example:</p>
  
  <pre><code>library("ggplot2")
  library("plotly")
  diamonds = diamonds[diamonds$cut %in% c("Fair", "Good"),]
  dia = ggplot(diamonds, aes(x = cut)) + 
    geom_bar(aes(stat = "identity", fill = cut)) + 
    facet_grid(.~color)
  
  ggplotly(dia)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nFfO3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nFfO3.png" alt="enter image description here"></a></p>
  
  <p>The <code>?plotly</code> documentation isn't very elaborate, and none of <a href="https://plot.ly/ggplot2/facet/" rel="nofollow noreferrer">these</a> have legends. </p>
  
  <p>Here's what comes up when I just type <code>ggplotly</code> if that gives any insight:</p>
  
  <pre><code>function (p = ggplot2::last_plot(), filename, fileopt, world_readable = TRUE) 
  {
      l &lt;- gg2list(p)
      if (!missing(filename)) 
          l$filename &lt;- filename
      if (!missing(fileopt)) 
          l$fileopt &lt;- fileopt
      l$world_readable &lt;- world_readable
      hash_plot(p$data, l)
  }
  </code></pre>