Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How to set 2 y-axis for data results

1 view (last 30 days)
Mahome
Mahome on 17 Mar 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello,
I have data results which need to be plotted in TWO y-axises vs ONE x-axis,
( X , Y1 , Y2 )
40.0000 0.5778 152.8081
41.0000 0.5867 154.7064
42.0000 0.5956 156.5817
43.0000 0.6045 158.4348
44.0000 0.6134 160.2664
45.0000 0.6223 162.0774
46.0000 0.6312 163.8684
47.0000 0.6401 165.6400
48.0000 0.6491 167.3928
49.0000 0.6580 169.1275
Can you help with how I code this kind of plots?
Thank you
  1 Comment
madhan ravi
madhan ravi on 17 Mar 2019
Edited: madhan ravi on 17 Mar 2019
yyaxis left
plot(X,Y1)
yyaxis right
plot(X,Y2)
%or
plotyy(X,Y1,X,Y2)
Thank you, I've already tried this methods and they're not suitable for what I'm looking for.
I am looking to generate one plot along x-axis which they have relation vaules between each others, and reader can read this plot in two ways by looking to the Y1 with respecting X gives a result, by looking to Y2 with repecting Y1 gives a result or by looking to Y2 with repecting Y1 gives a result ... similar to the plot below (attached)

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!