动漫人物
xlim和ylim别在这里割。你需要用expand_limits, scale_x_continuous,和scale_y_continuous..试着:df <- data.frame(x = 1:5, y = 1:5)p <- ggplot(df, aes(x, y)) + geom_point()p <- p + expand_limits(x = 0, y = 0)p # not what you are looking forp + scale_x_continuous(expand = c(0, 0)) + scale_y_continuous(expand = c(0, 0))您可能需要稍微调整一下,以确保点不被切断(例如,参见x = 5和y = 5.