Hey! I am plotting two time lines with two different y-axes. I want to limit my second y-axes to [0 20] and i want to add some tick marks like [0,5,10,15,20]. In my code matlab limits the second y-axes in the way i want it to, but the tick marks only reach from 0 to 10! Does anybody know what my problem is?
date=datenum(year,month,day,hour,0,0);
figure
[AX,hLine1,hLine2]=plotyy(date,iglob,date,feedin)
xlabel ('time')
ylabel(AX(1),'iglob')
ylabel(AX(2),'feedin')
title ('title')
ylim(AX(2),[0 20])
datetick(AX(1),'keeplimits')
datetick(AX(2),'keeplimits')
I already tried to add the following command, but it doesnt work. Whats my problem?
set(AX(2),gca,'YTickLabel',[0,5,10,15,20])
Thanks!!
Best Answer