How to create a graph with 3 y axis
조회 수: 26 (최근 30일)
이전 댓글 표시
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
dpb
2019년 1월 29일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!