How to change font size and location in a mask icon?
30 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to change font size and location in a mask. I found an answer here
disp('{\bf\fontsize{12}Label Text}', 'texmode','on');
but how to apply this to my case if I have some values to display
eg.
disp(str);
str=sprintf('PI controller\n\nLimit = %g / %g', UpperLimit, LowerLimit);
UpperLimit and LowerLimit are defined as mask parameters and the mask is automatically updated when new values are applied.
disp(str, 'texmode','on')
This works, but not sure how to change font size and make it bold/italics. Or if I want to have part of the text bold (e.g PI Controller) and Limit with smaller font.
0 Commenti
Risposte (1)
Sulaymon Eshkabilov
il 1 Ott 2022
You can try gtext() or text(), e.g.:
gtext(['This is awesone ' date], 'fontsize', 15, 'backgroundcolor', 'y')
%% OR
text(1, 1, ['This is awesone ' date], 'fontsize', 15, 'backgroundcolor', 'y')
0 Commenti
Vedere anche
Categorie
Scopri di più su Author Block Masks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!