How to “remove” bold headers for MATLAB numbers?

I am trying to combine several Matlab plots into one shape, and so I wonder how I can create “normal” tiles above my plots, and not the bold font provided by Matlab. Below is an example.

figure plot((1:10).^2) title({'First line';'Second line'}) 
+5
source share
1 answer

Use the argument 'FontWeight' :

 figure plot((1:10).^2) title({'First line';'Second line'},'FontWeight','Normal') 

Please also note that you can access the 'FontWeight' argument for all text objects in the picture at a time - in case you have, for example, several subplots in the picture --- using findall :

 myFig = figure; subplot(2,1,1) plot((1:10).^2) title('First plot') subplot(2,1,2) plot((1:10).^2) title('Second plot') % Set 'Normal' font weight in both titles above set(findall(myFig, 'Type', 'Text'),'FontWeight', 'Normal') 

As stated in the comments above; for one shape name, you can use \rm as an alternative. Note, however, that \rm depends on the selection (by default) of 'Interpreter' as 'tex' , whereas the above approach is valid for all interpreter options (but without effect for text objects using the 'latex' interpreter).

+7
source

Source: https://habr.com/ru/post/1240417/


All Articles