geom_density makes bar shaped graph
<p>I am trying to make a density curve for my data with the following code: </p>

<pre><code>ggplot(velar_nonnasal_low_f, aes(x = F2_difference, linetype = type)) +
  geom_density() +
  ggtitle("Density of F2 difference for /æ, ɛ/ for females") +
  xlab("F2 difference") +
  scale_fill_manual(name = "Place of Articulation") 
</code></pre>

<p>This code has worked fine with previous data frames, but now it produces the plot below instead of a smooth curve. I apologize if this is an easily answerable question (I am still learning R), but I just can't figure out why ggplot is plotting the data this way.</p>

<p><a href="https://i.stack.imgur.com/PNQoG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PNQoG.jpg" alt="enter image description here"></a></p>

<p>Here is some code so that you can reproduce a small part of what my data looks like.</p>

<p>Edit: Here is reproducible code of my actual data.</p>

<pre><code> type &lt;- c("coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal", "coronal")
        F2_difference &lt;- c(46.992662, 18.174776, -90.708617, -59.842787, -147.212234, -272.596601, 38.560577, 64.413318, -107.797167, -148.581689, -207.521093, 37.117600, -110.178964, 209.738062, 456.686906, 39.369545, -29.394699, -36.435841, 2.056190, -22.414031, 4.705579, -188.352557, -212.596306, 159.445017, -139.284470, -278.304356, -121.685889, -118.666014, 804.253078, -42.737883, 203.878428, -34.867516, -221.979230, -128.715072, 85.145217

        velar_nonnasal_low_f &lt;- data.frame (type, F2_difference)
</code></pre>