MATLAB: I want to add a 45-degree line on the plot. I tried some ways (including refline) all give me a 38-degree line!

MATLABplotplotting

Hey all
I wanted to have a 45-degree reference line on my plot. I searched and found there is a function namely refline so I use it but as you can see here it renders me a 38-degree line:
I even used
axis equal
but another problem appears. I mean although the line converted to 45 degrees but some space appears on my graph that is not good:
Here is the code that I used:
MONTHLY = scatter(X, Y)
refline
axis equal
As a result, I want something like a black line this graph:
In order to compare trendline (red line) with the perfect condition (45-degree black line).
I attach my X and Y.
Thank you so much

Best Answer

Try the following:
figure(1);hold on;
MONTHLY=scatter(X,Y);
plot(0:600); %45 degree line
plot(0:600,0.73*(0:600)+6.47); %trend line
legend('X-Y Line','45 degree Line','Trend Line')