Set default font settings for Simulink annotation (comments)
Ältere Kommentare anzeigen
Hello,
For improving visibility of model, I would like to change the defaul font for all anotations: I would like to use Courrier New Black 14 pt. How can I do this programmatically?
3 Kommentare
Dyuman Joshi
am 10 Okt. 2023
Verschoben: Dyuman Joshi
am 26 Okt. 2023
Changing the Font properties of the axes works for objects related to the axes (title, labels, etc).
However, for text objects and textbox via annotation, you will have to specify the properties manually.
%Sample plot
fplot(@sin)
xlabel('Input - time')
ylabel('Output - Signal')
title('Sinosuidal Curve')
%Get current axis
ax = gca;
name = 'Courier New';
sz = 14;
ax.FontName = name;
ax.FontSize = sz;
%Manually specifying font for text object
t = text(ax, 0,0,'\rightarrow sin(0)', 'FontName', name, 'FontSize', sz);
Dimitri
am 10 Okt. 2023
Verschoben: Dyuman Joshi
am 26 Okt. 2023
Dyuman Joshi
am 10 Okt. 2023
Verschoben: Dyuman Joshi
am 26 Okt. 2023
Ah, okay. I should have noticed the product mentioned as "Simulink".
I will get back to you on this soon.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
