Filter löschen
Filter löschen

Plots - Two Y-Axis with Different Units

23 Ansichten (letzte 30 Tage)
Tony Rankin
Tony Rankin am 4 Dez. 2019
Bearbeitet: Rik am 1 Jun. 2021
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 Kommentare
Tony Rankin
Tony Rankin am 1 Jun. 2021
Another comment.
Tony Rankin
Tony Rankin am 1 Jun. 2021
How about another comment?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Raj
Raj am 4 Dez. 2019
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 Kommentare
Tony Rankin
Tony Rankin am 1 Jun. 2021
Comment.
Tony Rankin
Tony Rankin am 1 Jun. 2021
Another comment.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by