title: How to do a density plot using pipes?
body: <p>I am trying to plot a density plot using the weatherAUS data set available in R. I have tried with the following code. But, I am not able to plot the perfect density plot of the Rainfall distribution.
  With the below code my plot looks like</p>
  <p><a href="https://i.stack.imgur.com/vKlSl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vKlSl.png" alt="enter image description here" /></a></p>
  <p>for dataset use -&gt; View(weatherAUS)  # this the R in-built dataset.</p>
  <p>So, how can I plot the density plot perfectly? I want my plot to look like the following:
  <a href="https://i.stack.imgur.com/VopuG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VopuG.jpg" alt="enter image description here" /></a></p>
  <pre><code> cities &lt;- c(&quot;Canberra&quot;, &quot;Darwin&quot;, &quot;Melbourne&quot;, &quot;Sydney&quot;)
  # Build the required dataset and plot it.
  weatherAUS %&gt;%
    filter(Location %in% cities) %&gt;%
    filter(Rainfall %&gt;% is.na() %&gt;% not()) %&gt;%
    ggplot(aes(x=Rainfall, colour=Location, fill=Location)) +
    geom_density(alpha=0.55) +
    labs(title=&quot;Distribution of Rainfall&quot;,
         subtitle=&quot;Selective Locations&quot;,
         caption=&quot;Source: Australian Bureau of Meteorology&quot;,
         x=&quot;Rainfall&quot;,
         y=&quot;Density&quot;)
  </code></pre>