title: How to create a continuous legend (color bar style) for scale_alpha?
body: <p>Currently, a <a href="http://ggplot2.tidyverse.org/reference/guide_colourbar.html" rel="nofollow noreferrer">continuous colour bar legend, <code>guide_colorbar</code></a> is available only with <code>scale_fill</code> and <code>scale_colour</code>, and not with <code>scale_alpha</code>. The legend which is generated with  <code>scale_alpha</code> is of a discrete type (<a href="http://ggplot2.tidyverse.org/reference/guide_legend.html" rel="nofollow noreferrer"><code>guide_legend</code></a>).</p>
  
  <p>A small example where <code>color</code> and <code>alpha</code> are mapped to a continuous variable:</p>
  
  <p><code>scale_color</code> generates a continuous color bar type legend :</p>
  
  <pre><code>ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, color = Sepal.Width)) +
    geom_point()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/B3aMX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B3aMX.png" alt="enter image description here"></a></p>
  
  <p><code>scale_alpha</code> generates a discrete legend, despite <code>alpha</code> is mapped to a continuous variable:</p>
  
  <pre><code>ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, alpha = Sepal.Width)) +
    geom_point()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/EGXDZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EGXDZ.png" alt="enter image description here"></a> </p>
  
  <p>Is there some way to get a continuous color bar legend also for <code>scale_alpha</code>?</p>