Controlling Y-Axis Label Properties on Multi-Axis Plots
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I'm using plotyy to make a graph of my data, but I cannot figure out how to programmatically edit the y-axis labels. Specifically, I would like to change the font size. Because I'm using plotyy, ylabel is off the table. Using set(ax,'FontSize',value) only affects the axis tick labels, x label, and legend.
Thanks,
Clay
0 Kommentare
Antworten (1)
Luffy
am 10 Jul. 2012
For example:
x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
set(get(AX(1),'Ylabel'),'String','Slow Decay') ;
set(get(AX(2),'Ylabel'),'String','Fast Decay');
set(get(AX(2),'Ylabel'),'FontSize',30); % You can replace 30 with size you want.
% Similarly for other axis.
0 Kommentare
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!