Can someone remind me of how I get rid of that gap between the 0 and the X-axis?
Thanks
suppressMessages(library(data.table));
suppressMessages(library(tidyverse))
library(ggalt)
DT <- data.table( xx = seq(2013, 2023, by = 1),
yy = c(18.9, 29.6, 39.5, 6.4, 19.2, 9.3, 41.1, 12.9, 28.3, 44.8, 74.1))
ggplot(DT, aes(as.character(xx), yy)) + geom_lollipop() + coord_flip() +
xlab("Year")
Cancel the request . I was trying to adjust the x-axis when I needed to adjust the y-axis!
ggplot(DT, aes(as.character(xx), yy)) + geom_lollipop() + coord_flip() +
xlab("Year") + scale_y_continuous(expand = c(0, 0))
system
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.