Plot multiple axis in same plot (not plotyy)
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to plot only one vector with two Y axes. One axe will indicate "samples" and the other "time" (since each sample is actually some instant). I mean, the two axes are just proportional. I need both information in the same plot.
With plotyy (or creating "child" axes for a "parent figure") you then have to plot twice the same vector. One time for each axe.
But I wonder if there's an easier way, beacuse I want to use mesh and imagesc plotts and is inefficient to plot same vector twice in same figure.
thanks in advance
0 Kommentare
Antworten (1)
Walter Roberson
am 25 Dez. 2011
You will still need multiple axis, as the tick labels apply to the whole axis. You should, however, not need to actually plot anything in the second axis, as you can set the axis ylim to the range you need.
It is probably easiest to still use plotyy() to set things up. You can plot just the min y to the max y but in "time" units. Then you can set set the ylim for that axis, and then you can remove the line object of the two points.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Two y-axis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!