I have a figure with the following code. How can I add 20 and 80 to the secondary y label? Now it looks like this:
axes1 = axes('Parent',figure(15),'YTick',[8.5 9.5 10.5],'Color',[0 0 0]);[ax,p1,p2] = plotyy(annual(:,1),annual(:,7),lc2(:,1),lc2(:,2:3));hold onset(p1,'LineStyle',':','Marker','v','DisplayName','DO')set(p2(1),'LineStyle','--','Marker','*','Color',[1 0 0],'DisplayName','Developed')set(p2(2),'LineStyle','--','Marker','*','Color',[0 0.5 0],'DisplayName','Forest')[p,~,mu] = polyfit(annual(8:20,1),annual(8:20,7),3)f = polyval(p,annual(8:20,1),[],mu);hold onplot(annual(8:20,1),f,'k','DisplayName','DO Trendline')xlabel('Time')ylabel(ax(1),'DO (mg/l)') % left y-axis
ylabel(ax(2),'Area (%)') % right y-axis
ylim(ax(1), [8.5 10.5]);ylim(ax(2), [0 100]);legend(axes1,'show');
Best Answer