I'm having issues on being able to show all the years on my graph that are represented in my dataset such as 2008,2009,2010,2011,2013,2014,2015,2016,and 2017.

It is only using the years 2010 2012 2015 along with strange .0 .5 at the end of them. How do I fix this?

Here is my code so far.

co2emissionsdata %>%
  ggplot(aes(x = Year, y = `CO2EmissionsPerCapita(tonne)`, color= State)) +
  geom_line() + 

I tried using scale_x_continuous() but nothing happened as I am very new so I'm not sure if I was using the function correctly, via filling in the correct things for my graph or there is another method that will fix this issue.

0

There are 0 best solutions below