フィルターのクリア

Changing Plot and Label font

27 ビュー (過去 30 日間)
Nikolay Rodionov
Nikolay Rodionov 2012 年 5 月 23 日
Hi all,
I have 3 simple questions,
1. Is it possible to change the font sizes of the numbers on a plot's axes? If so, how?
2. I make frequent use of the property editor to change the font size of my plot's labels, how can I code for this?
3. Is it possible to change the font style of labels on a plot (i.e bold italic ect.)?
Thank you, Nikolay

採用された回答

Oleg Komarov
Oleg Komarov 2012 年 5 月 23 日
Suppose you have the following example:
x = -pi:.1:pi;
y = sin(x);
plot(x,y)
lx = xlabel('x');
ly = xlabel('y');
1. Change FontSize
set(gca,'FontSize',14)
2. Yes. When creating labels, store their handles into some variables, then use set(). See also get() and the useful inspect().
3. Yes. To control string properties see this link http://www.mathworks.co.uk/help/techdoc/ref/text_props.html#String
set(lx,'string','\it x')

その他の回答 (0 件)

カテゴリ

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