MATLAB: Suggest me how to plot 45 degree line in MATLAB

plotplotting

how can I plot a line with 45 degree angle in the graph as reference line????
when I use the code "refline" the line I got different angle line and I want 45 degree angle line from the centre of both axes so please suggest me how can I get.

Best Answer

I guess, that you do get a 45 deg angle, but that the different scaling of X and Y axes let it look in another angle. See:
axis equal
to use the same scaling for both directions.
Related Question