There's a bunch of whitespace that R is automatically adding to my dot plot. Is there any way to to fix this (ie. by adjusting the y-scale)? Everything I've tried (adjusting ylim()
, limits
) doesn't change anything. Here is my code and I've attached a screenshot of the current plot.
ggplot(TieDomiData, aes(x = Science)) +
geom_dotplot(binwidth = 1.5, stackratio = 1.5,
col = "olivedrab3",
fill = "olivedrab3",
dotsize = 1) +
scale_y_continuous(name = NULL, breaks = NULL) +
scale_x_continuous (
name = "Mark",
breaks = c(seq(40, 100, 5)),
limits = c(40, 100),
labels = c(seq(40, 100, 5))
) +
ggtitle("Grade 9 Overall Science Marks")