I have a dataframe like this
Data2 <- structure(list(year = c(2008L, 2009L, 2010L, 2011L, 2012L, 2013L,
2014L, 2015L, 2016L, 2017L, 2018L, 2019L, 2008L, 2009L, 2010L,
2011L, 2012L, 2013L, 2014L, 2015L, 2016L, 2017L, 2018L, 2019L,
2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 2014L, 2015L, 2016L,
2017L, 2018L, 2019L), variable = c("Yahoo", "Yahoo", "Yahoo",
"Yahoo", "Yahoo", "Yahoo", "Yahoo", "Yahoo", "Yahoo", "Yahoo",
"Yahoo", "Yahoo", "Amazon", "Amazon", "Amazon", "Amazon", "Amazon",
"Amazon", "Amazon", "Amazon", "Amazon", "Amazon", "Amazon", "Amazon",
"Google", "Google", "Google", "Google", "Google", "Google", "Google",
"Google", "Google", "Google", "Google", "Google"), value = c(1L,
0L, 0L, 0L, 1L, 1L, 3L, 4L, 3L, 10L, 9L, 0L, 0L, 1L, 0L, 0L,
3L, 2L, 2L, 3L, 8L, 9L, 12L, 3L, 0L, 0L, 0L, 0L, 0L, 1L, 1L,
0L, 1L, 2L, 4L, 0L)), class = "data.frame", row.names = c(NA,
-36L))
and I would like to plot it using this:
library(ggplot2)
ggplot(Data2, aes(year, variable, size = value, color = variable)) +
geom_point()
However the problem with this plot is that the x-axis has not for example 2007 but it has 2007.5 and the bubbles in not in the symmetric place
How can I fix it?