How to create a graph with 3 y axis
33 views (last 30 days)
Show older comments
Hello,
I been trying to create a graph with 3 y axis and centralise the zero in the middel.
figure
yyaxis left
quiver(EC_time', zeros(size(x_velocity)),x_velocity,y_velocity);
ylim([-0.05 0.05])
axis equal
datetick('x')
axis equal
yyaxis right
bar(EC_time, Mayflux);
ylim([-40 40]);
axis equal
hold on
plot(EC_time, oxygen_may1, 'o-');
hold all
plot(EC_time, oxygen_may1, 'ro-');
plot(EC_time, oxygen_may_optode1, 'go-');
ylim([245 248]);
Could some one give me advise on this? I was trying addaxis but it was not working.
figure
plot(advN.harmonic_fit.thf, Umagadvh)
addaxis(EC_time, Mayflux)
% hold on
addaxis(advN.harmonic_fit.thf, udiradvh);
addaxis(EC_time, oxygen_may1, 'ro-')
datetick 'x'
Thank you.
14 Comments
dpb
on 29 Jan 2019
I've got pressing deadlines to take too much time away from at present to invest a great deal of time at this instant, sorry...
I'd again make two suggestions--
1) Convert your time data to datetime from the deprecated datenum and you may just find that things work better as there is an overloaded plot function that will automagically get called and you can get rid of datetick
2) If that doesn't bring joy, download and look at the other FEX submission link I showed and see if its application of the third axis will give you a set of axes that you can live. It's much less complicated a solution and you should be able to modify it at will.
Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!