Plots - Two Y-Axis with Different Units

조회 수: 60 (최근 30일)
Tony Rankin
Tony Rankin 2019년 12월 4일
편집: Rik 2021년 6월 1일
I need to plot a lot of data from an Excel file. I would like to plot one column of data (flow rate) against the left y-axis and have two columns of data (pressure drops) against the right y-axis. How do I do this?
I thought I could work it out using the help pages, but I have no idea how to code the data. I am importing it from Excel and plotting instead. At the moment the plot looks ridiculous because it is plotting it all against the left y-axis and the values for the pressure drops are small compared to the flow rate.
  댓글 수: 6
Tony Rankin
Tony Rankin 2021년 6월 1일
Another comment.
Tony Rankin
Tony Rankin 2021년 6월 1일
How about another comment?

댓글을 달려면 로그인하십시오.

답변 (1개)

Raj
Raj 2019년 12월 4일
Since you have not shared the data, it is not possible to give exact solution to your problem but if you are looking for plotting on both primary (left side) and secondary axis (right side) of a graph, you should use yyaxis command.
See details here:
Hope this helps!
  댓글 수: 3
Tony Rankin
Tony Rankin 2021년 6월 1일
Comment.
Tony Rankin
Tony Rankin 2021년 6월 1일
Another comment.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by