Hi,
My questions are:
1. How can I make the first y-plot black (tick labels and the axis) and the second y-plot red?
2. How can I make the second y-plot's ticklabels discrete numbers? i.e. I do not want to show 0.5 and 1.5?
I have used the following code:
[AX,H1,H2] = plotyy(x,observed,x,capture,'plot', 'stem');set(H1, 'Color', 'k');set(H2, 'Color', 'r');set(H1,'LineStyle','-', 'LineWidth', lineWidth,'DisplayName', 'Threshold');set(H2,'LineStyle',':', 'LineWidth', lineWidth-1, 'DisplayName', 'Capture Rate'); h = [H1 H2];set(AX,'XTick',1:aralik:lengthTime, 'FontSize', 32); set(AX,'Xticklabel',' ');set(AX,'XTickLabel',times);%set(gca,'FontSize',34,'LineWidth',lineWidth);
h_xlabel = get(gca,'XLabel');set(get(AX(1), 'Ylabel'),'String','Journey Time (min)', 'FontSize',axisSize, 'Color', 'k' );set(get(AX(2),'Ylabel'),'String','Capture Rate', 'FontSize',axisSize, 'Color', 'r'); set(h_xlabel,'FontSize',axisSize);legend(h);
Best Answer