Hi, can someone tell me how to increase the font size when using num2str?
ex:text(x(i),y(i),num2str(i))

 Akzeptierte Antwort

KSSV
KSSV am 3 Jan. 2017

0 Stimmen

text(x(i),y(i),num2str(i),'FontSize',14)
Specify your required size...

Weitere Antworten (1)

José-Luis
José-Luis am 3 Jan. 2017
Bearbeitet: José-Luis am 3 Jan. 2017

1 Stimme

num2str() has nothing to do with the font size. It just does what its name implies. Once you have got your string, here is a way of setting its size:
axes;
text(0.5, 0.5,'\fontsize{24}{0}\selectfont{I am big}\fontsize{8}{0}\selectfont{I am small}','Interpreter','Latex');

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 3 Jan. 2017

Kommentiert:

am 11 Jan. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by