title: Shiny update the clicked point to highlight it
body: <p>Here is a working example of extracting the on-click event. I would like to ask you if there is a way to update the clicked point with either increase in size or highlight it etc.,?</p>
  
  <pre><code>library(shiny)
  library(plotly)
  
  ui &lt;- fluidPage(
      plotlyOutput("plot"),
      verbatimTextOutput("click")
  )
  
  server &lt;- function(input, output, session) {
  
      nms &lt;- row.names(mtcars)
  
      output$plot &lt;- renderPlotly({
          p &lt;- ggplot(mtcars, aes(x = mpg, y = wt, col = as.factor(cyl), key = nms)) + 
             geom_point()
          ggplotly(p)
  
      })
  
      output$click &lt;- renderPrint({
          d &lt;- event_data("plotly_click")
          if (is.null(d)) "Click events appear here (double-click to clear)" 
          else cat("Selected point associated with Car: ", d$key)
      })
  
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/AFSnH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AFSnH.png" alt="enter image description here"></a></p>
  
  <p><em>I have searched SO and other appropriate sources for finding a solution to the below question, but could not find one.</em></p>
  
  <p><strong>Update:</strong></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/a/45969832/4836511">This</a> solution works better for this toy plot. But, my original use case contains 50+ levels for the variable of interest and there are high chances that Magenta or any other color would already be present. Also, it takes a considerable amount of time to change the color.</li>
  <li>Is there any way to increase the size of the clicked point to differentiate it from 100s of nearby points?</li>
  </ul>
  
  <p><em>A related question to change the shape of the clicked point has been asked <a href="https://stackoverflow.com/q/45983949/4836511">here</a>.</em></p>