title: Overlay Two ggplot in Shiny
body: <p>I have a very large dataset that I'm plotting on Shiny using ggplot. I have a a slider tied to the values on x axis with which I would like to recolor the selected subset of the data and let the rest of the data remain as is.</p>
  
  <p>The simplest option is to recreate the entire plot but since it's a large dataset it's a very slow process. As an alternative, I was considering letting the original plot stay as is, and putting another plot on top of it with the <code>plot.background = 'none'</code> and just the coloured points. I'm unable to achieve this with the <code>renderPlot</code> in the <code>server.r</code> and <code>plotOutput</code> in the <code>ui.r</code> -</p>
  
  <p>server.r:</p>
  
  <pre><code>output$Plot1= renderPlot({
     ggplot(mtcars) + geom_point(aes(x = mpg, y = wt))
  })
  
  output$Plot2= renderPlot({
         ggplot(mtcars[mtcars$mpg &gt; 15,]) + geom_point(aes(x = mpg, y = wt), color = 'Efficient')
  })
  </code></pre>
  
  <p>ui.r (I don't know how to fit Plot2 in this):</p>
  
  <pre><code>fluidRow(
                 class = 'Plot1Row',
                 column(
                    plotOutput(
                       "Plot1", 
                       width = '100%'
                    ),
                    width = 12
                 )
              )
  </code></pre>
  
  <p>Any tips?</p>