title: R: ggplot:: geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
body: <p>I am trying to make a line graph in ggplot and I am having difficulty diagnosing my error. I've read through nearly all the similar threads, but have been unable to solve my issue. </p>
  
  <p>I am trying to plot Japanese CPI. I downloaded the data online from FRED.</p>
  
  <p>my str looks like: </p>
  
  <pre><code>str(jpycpi)
  
  data.frame: 179 obs. of  2 variables:
   $ DATE           : Factor w/ 179 levels "2000-04-01","2000-05-01",..: 1 2 3 4 5 6 7 8 9 10 ...
   $ JPNCPIALLMINMEI: num  103 103 103 102 103 ...
  </code></pre>
  
  <p>My code to plot:</p>
  
  <pre><code>ggplot(jpycpi, aes(x=jpycpi$DATE, y=jpycpi$JPNCPIALLMINMEI)) + geom_line()
  </code></pre>
  
  <p>it gives me an error saying: </p>
  
  <blockquote>
    <p>geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?</p>
  </blockquote>
  
  <p>I have tried the following and have been able to plot it, but the graph x bar is distorted for some odd reason. That code is below:</p>
  
  <pre><code>ggplot(jpycpi, aes(x=jpycpi$DATE, y=jpycpi$JPNCPIALLMINMEI, group=1)) + geom_line()
  </code></pre>