title: How to resolve ggplotly error using color fill
body: <p>Using the <code>ggplotly</code> call extending from ggplot2, I'm trying to add an outline to the points.</p>
  
  <p>The call to <code>ggplot</code> works, but extending the call to <code>ggplotly</code> yields an error.</p>
  
  <blockquote>
    <p>The objective is the have an interactive plot with color filled points based on a continuous variable with a black outline (using <code>pch</code>=21 in this case).</p>
  </blockquote>
  
  <p><strong>Minimal reproducible example:</strong></p>
  
  <pre><code>library(ggplot2)
  library(plotly)
  ggplot(data=mtcars, aes(mpg, wt, fill=hp))+geom_point(pch=I(21))+scale_fill_continuous(low='red', high='blue')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PmIqV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PmIqV.jpg" alt="enter image description here"></a></p>
  
  <pre><code>ggplot(data=mtcars, aes(mpg, wt, fill=hp))+geom_point(pch=I(21))+scale_fill_continuous(low='red', high='blue')+ggplotly()
  </code></pre>
  
  <p><code>Error: Don't know how to add o to a plot
  In addition: Warning message:
  In L$marker$color[idx] &lt;- aes2plotly(data, params, "fill")[idx] :
    number of items to replace is not a multiple of replacement length</code></p>