How to set y axis values and intervals in my qqnorm plot?

The dataset is:

last = read.table("http://users.stat.umn.edu/~sandy/courses/8053/Data/Wichern_data/T1-6.dat", header=FALSE,col.names=c("x1", "x2","x3","x4","x5", "group"))

mu = filter(last, group == 1)
qqnorm(mu$x1, main="group: MS", ylab="x1", xlab = "")

Now R gives me the figure that y axis is from 25 to 60, and the interval is 5. What I want is y axis is from 20 to 80, and the interval is 10. How to do?

Here is an example where I draw the plot with no y axis, but setting the y axis limits, and then draw the y axis setting the tick spacing with the at and labels arguments.

set.seed(123)
Value=runif(n = 8,min = 10,max = 25)
qqnorm(Value,yaxt="n",ylim = c(0,30))
axis(side = 2,at = seq(0,30,5),labels = seq(0,30,5))

Created on 2021-11-27 by the reprex package (v2.0.1)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.