创建向日葵图进行logistic回归时,x轴从2开始。我能改变这种行为使x轴从0开始吗?我已经尝试通过更改x轴来手动更改它,但这并没有使x=0可见(参见#c1)。
现在的向日葵地块图像,从x=2开始;

# EE contains the Likert Scale values
EE.min <- min(EE)
EE.max <- max(EE)
EE.x <- seq(EE.min, EE.max, length = 500)
New.EE <- data.frame(EE = EE.x)
# Creating prediction
EE.p <- predict(logit, New.EE, type = "response")
sunflowerplot(EE, cb, main = "Effort Expectancy",
xlab= "EE (5-point Likert-Scale)", ylab="Likelihood", yaxt="n", xaxt="n")
# c1:
axis(1, at = seq(0,5,0.5), labels = c(0, 0.5, 1, 1.5, 2, 2.5 , 3, 3.5, 4, 4.5, 5), las=1)
axis(2, at = seq(0,1,0.2), labels = c("No = 0", 0.2, 0.4, 0.6, 0.8, "Yes = 1"), las = 2)
abline(h = seq(0,1,0.2), lty = 2)
lines(EE.x, EE.p)发布于 2021-07-15 12:28:20
sunflowerplot对x轴的限制有一个参数xlim。
比较
sunflowerplot(iris$Sepal.Length, iris$Sepal.Width)至
sunflowerplot(iris$Sepal.Length, iris$Sepal.Width, xlim = c(0, 20))https://stackoverflow.com/questions/68393741
复制相似问题