title: Shiny w/ ggplot produces erroneous legend: duplicate legend entries with facets
body: <p>I want to plot a facet plot with added geom_hline and show the line in the legend. However, when I add the line to the legend, all entries duplicate to the number of facets.<br>
  How can I avoid this behaviour?<br>
  Here is my MWE  </p>
  
  <pre><code>library(shiny)
  library(plotly)
  library(ggplot2)
  
  df &lt;- mpg
  
  # Define UI for application that draws a histogram
  ui &lt;- fluidPage(
      mainPanel(
          plotlyOutput('graph')
      )
  )
  
  # Define server logic required to draw a histogram
  server &lt;- function(input, output) {
  
      output$graph &lt;- renderPlotly({
          p &lt;- ggplot2::mpg %&gt;%
          plot_ly %&gt;%
          ggplot() +
          geom_point(aes(displ, hwy, color = class))
  
          facet &lt;- p + facet_wrap(~year)
  
          facet + geom_hline(aes(yintercept = 20, linetype = 'hline20'), color = '#00b700') +
              scale_linetype_manual(name = 'line', values = 1,
                                   guide = guide_legend(aes = list(color = "#00b700")))
      })
  }
  
  # Run the application 
  shinyApp(ui = ui, server = server)
  </code></pre>