R会自动将一堆空白添加到我的点图中。有什么方法可以解决此问题(即通过调整y缩放比例)吗?我尝试过的所有内容(调整ylim()
,limits
)都没有改变。这是我的代码,并随附了当前图的屏幕截图。
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")