How to use plotyy for two sets of data?

Hey, I have to plot x versus ya1,ya2,ya3 plots and compare it by overplotting yb1,yb2,yb3 for the same xa. I used plotyy to do that but I have trouble with axes scale's.
[hAx,hx1,hx2] = plotyy(x,ya1,[x,x],[ya2,ya3])
hold on;
[hAx_1,hx1_1,hx2_1] = plotyy(x,yb1,[x,x],[yb2,yb3])
% Tried matching axis using
set(hAx(2),'xtick',get(hAx(1),'xtick'),'xticklab',get(hAx(1),'xticklab'))
set(hAx_1(1),'xtick',get(hAx(1),'xtick'),'xticklab',get(hAx(1),'xticklab'))
set(hAx_1(2),'xtick',get(hAx_1(1),'xtick'),'xticklab',get(hAx_1(1),'xticklab'))
set(hAx_1(1),'ytick',get(hAx(1),'ytick'),'yticklab',get(hAx(1),'yticklab'))
set(hAx_1(2),'ytick',get(hAx(2),'ytick'),'yticklab',get(hAx(2),'yticklab'))
But still no use. Need help. Thanks in advance

1 件のコメント

Jan
Jan 2017 年 4 月 28 日
Please explain the troubles you have. We cannot guess this important detail.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeTwo y-axis についてさらに検索

質問済み:

2017 年 4 月 28 日

コメント済み:

Jan
2017 年 4 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by