Solved – Tool to draw normal QQ-plot with 45 degree reference line

data visualizationnormal distributionqq-plotquantiles

I have some data (a set of numbers) and I want to compare them with the normal distribution using QQ-plot. The only statistical tool that I am aware of is Octave but Octave doesn't draw the reference line.

enter image description here

As can be seen in the above picture the x-axis has a range from – 3 to 3 but the y-axis has a range from 20 to 140. I think drawing a 45 degree slope line would be wrong.

How can I draw such a reference line in Octave? Or does there exist any easy tool that would draw a QQ-plot with that reference line?

Best Answer

This is easy in R:

x <- rnorm(1000, 100, 10)  #Creates some data; this has is normal with mean 100 sd 10
qqnorm(x)         #qq
qqline(x)         #adds line