Controlling Y-Axis Label Properties on Multi-Axis Plots
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Luffy
on 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 Comments
See Also
Categories
Find more on Axis Labels 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!