change font size of subplot text
10 ビュー (過去 30 日間)
表示 古いコメント
i have a subplot with text labels next to plotted data...i use set(text,'FontSize',8) intending to change default 10 size...text is a handle/struct with such a property and i don't get any errors but there's no effect at all:
for k=1:8:(length(datalabel))
text(l_i(q)+5,var_i(q)-1,datalabel(k:k+7))
set(text,'FontSize',8)
q=q+1;
end
回答 (1 件)
Binbin Qi
2016 年 5 月 11 日
I use the following code, it can work
clear;clc;close all
subplot(335);
fplot(@sin,[-1,1]);
tx = text(.5,.5,'y = sin(x)');
tx.FontSize = 20;

2 件のコメント
Binbin Qi
2016 年 5 月 11 日
I am using matlab R2016a. I think because you use a text as a parameter. The text was interpreted as a command and make a new text. set command works on that new text not on original text.
参考
カテゴリ
Find more on Subplots 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!