How to plot a graph with 2 Y axis of different scale in Matlab 2015?

22 ビュー (過去 30 日間)
Neha Sinha
Neha Sinha 2019 年 1 月 15 日
編集済み: Yadu Bhusal 2022 年 3 月 2 日
I need to plot 2 plots on the same graph with one y axis on the left and other y axis on the right in Matlab 2015.

採用された回答

Mustafa Abu-Mallouh
Mustafa Abu-Mallouh 2019 年 1 月 15 日
編集済み: Mustafa Abu-Mallouh 2019 年 1 月 15 日
For MATLAB R2015_, take a look at the plotyy function. That should be what you are looking for.
Beginning with R2016a, you would want to take a look at the yyaxis function and use that instead.
  2 件のコメント
Neha Sinha
Neha Sinha 2019 年 1 月 15 日
Thank you
Yadu Bhusal
Yadu Bhusal 2022 年 3 月 2 日
編集済み: Yadu Bhusal 2022 年 3 月 2 日
Well I was stuck on the same problem. I want 3 data set in primary y axis and 2 data set on secondary y axis with common data along x axis. I tried with [hAx, hLine1, hLine2] = plotyy([x',x',x'],[y1,y2,y3],[x',x'],[y4,y5]) It didn't work. But it worked for two data on primary and one data in secondary. Any help would be appreciated.

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

その他の回答 (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