MATLAB: How to adjust plot scaling/divisions

limitsscaling

Hi Everyone, I have the following plots:
I want to show the values between the limits 1000 and 500 on the y-axes. MATLAB automatically chooses to show only the limit values. I would appreciate any help on this.Thanks.

Best Answer

ylim([500 1000])
doc ylim % for details
"...the intermediate values still don't show"
Then set ticks where you want them...
set(gca,'ytick',[500:100:1000])
Hadn't actually noticed the two axes as the color on the RH one is quite light and doesn't show well...anyway, presuming that it's plotyy, there are two axes handles from a call such as
hAx=plotyy(xL,yL,xR,yR); % where the two axes handles are in hAx
Now use those two handles in the call to ylim and to set the tick values...or, since know want each just make a single call to set
set(hAx(1),'ylim',[500 1000],'ytick',[500:100:1000]) % LH axes
Now repeat with desired values for the RH axes as
set(hAx(2), 'ytick',[0:100:500]) % RH axes