Plotyy y-axis ticks/label issues
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jennifer Kurtz
am 20 Mär. 2014
Bearbeitet: Azzi Abdelmalek
am 20 Mär. 2014
I'm trying to show tick marks and their values on both y axis, but nothing I do seems to help. Here's my code.
%Plot Absorbance and Current versus time.
[AX,H1,H2]=plotyy(t,AU,t,uA);
title (FileName);
xlabel ('Time(minutes)');
ylabel (AX(1),'Absorbance (AU)');
ylabel (AX(2),'Current (\muA)');
set(AX(2),'XTickLabel','','XAxisLocation','Top');
set(AX(1),'ylim',[min(AU) max(AU)]);
set(AX(2),'ylim',[min(uA) max(uA)]);
set(AX(1),'xlim',[t(1) t(end)]);
set(AX(2),'xlim',[t(1) t(end)]);
legend('Absorbance','Current');
Current should be from about 0 to 60. Absorbance should be from about 0 to .03. The x axis tick marks/labels show up fine. The only y axis that has any kind of scaling is the right (current) and it only has one value. Can anyone help?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 20 Mär. 2014
Bearbeitet: Azzi Abdelmalek
am 20 Mär. 2014
add
set(AX(2),'ytick',linspace(min(uA),max(uA),5));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Axis Labels 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!