フィルターのクリア

Controlling Y-Axis Label Properties on Multi-Axis Plots

1 回表示 (過去 30 日間)
Clay
Clay 2012 年 7 月 10 日
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

回答 (1 件)

Luffy
Luffy 2012 年 7 月 10 日
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.

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by