Scatter plot using secondary axis of plotyy

14 ビュー (過去 30 日間)
Danilo
Danilo 2015 年 7 月 12 日
編集済み: Azzi Abdelmalek 2015 年 7 月 12 日
Hi, First of all, thanks to the community, I have learnt so much just reading the answers to many posed questions. My problem is: I am trying to overlay two scatter plots using the left and the right y axis after a do a plotyy command.
I tried:
[ax, p1, p2]=plotyy(x1,y1,x2,y2);
scatter(x1,y3); %it works and it uses the left y axis
scatter(ax(2), x1, y4) % it doesn't work..
Do you have any suggestion? Any help would be appreciated.
Best, Dani

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 12 日
編集済み: Azzi Abdelmalek 2015 年 7 月 12 日
[ax, p1, p2]=plotyy(x1,y1,x2,y2);
hold(ax(1),'on')
scatter(ax(1),x1,y3);
hold(ax(2),'on')
scatter(ax(2),x1,y4)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by