Appearances can be deceiving. Why do you think the line is NOT at 45 degrees? (I know, silly question, but there is a point in it.)
In fact, a 45 degree line merely means that the rise and run are the same. That is, if you change x by some number deltax, then y changes by exactly the same amount. Does that not happen in your plot? I know. You still do not see it.
So what is happening here? The units on the x and y axes are not the same. I'll create two plots as an example.
plot(rand(5),rand(5),'ko')
hold on
plot([0 1],[0 1],'r-')
axis equal
Does the line appear to be at 45 degrees? We know it is, and it looks like it is.
Now, just change the axis scaling. The numbers are still identically the same.
axis normal
axis([0 1 0 2])
Does it look like a 45 degree line now?
In this context, look at the axes on the plot you show. Are the axes scaled the same way?
Best Answer