简体   繁体   中英

Using plot() in R and obtaining a line connecting the points when I want to have dots

I am trying to plot the residuals of a model in R and I am obtaining a line plot instad. Can you help me? I don't wish to connect the points.

residuals <- as.data.frame(fit$residuals)
row.names(residuals)<- NULL
plot(residuals$x, axes=F, xlab="", ylab= "Residuals")
Axis(side=2, labels=T)[![enter image description here][1]][1]

在此处输入图像描述

Have you tried: plot(residuals$x, axes=F, xlab="", ylab= "Residuals", type = "p")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM