Horizontal line in Matlab with date on x axis -
i have piece of code in matlab need plot graph including lines depending on dates (x axis). want add horizontal line @ y=0 mimic x axis not shown due negative value.
here code:
figure1 = figure('name','historical performance'); plot(quarterend,perf(1,:),'b',quarterend,perf(2,:),'r','datetimetickformat','qqq-y','linewidth',2) xlabel('quarter'); ylabel('performance'); ax = gca; ax.xticklabelrotation=45; legend('historical performance prediction','best historical performance','location','southwest');
i have tried
line(quarterend,[0 0],'color','g')
but not span right interval. need line displayed on interval there data points. there easy way so?
Comments
Post a Comment