title: R - How to Plot Multiple Density Plots With ggvis
body: <p>How would one go about plotting multiple density plots on the same set of axes? I understand how to plot multiple line graphs and scatter plots together, however the matter of having the density plots share a common x-axis is tripping me up. My data is currently set up as such:</p>
  
  <pre><code>name  x1   x2   x3
  a     123  123  123
  b     123  123  123
  c     123  123  123
  </code></pre>
  
  <p>Thanks for the help!</p>
  
  <p>EDIT: Here are some details I was missing which may help make my question clearer.</p>
  
  <p>I have a data frame <code>attr_gains</code> which looks like the example above, and whose variable names are <code>Str</code>, <code>Agi</code>, and <code>Int</code>. So far, I have been able to get a density plot of the <code>Str</code> variable alone with this code:</p>
  
  <pre><code>  attr_gains %&gt;%
    ggvis(x=~Str)%&gt;%
    layer_densities(fill :="red", stroke := "red")
  </code></pre>
  
  <p>What I would like to do is overlay two more density plots, one for <code>Agi</code> and <code>Int</code> each, so that I have three density plots on the same set of axes.</p>