我正在尝试更改在simulink中使用的范围的轴、图例和标题的字体大小。
发布于 2020-01-17 05:38:11
我已经尝试了几个方法,但是没有直接的方法来实现它。但是,我们可以调整与scope关联的图形中标题和x/y标签的字体大小
File > Print to Figure
这将把你带到一个图形,在那里我们可以编辑图形的字体。
编辑>地物属性
在弹出窗口中,编辑字体。
发布于 2018-11-15 23:11:19
在simulink中,可以使用以下链接更改字体样式和大小:
图>格式>模型的字体样式
您可以在其中更改块、线和注释的字体样式和大小。
发布于 2018-11-27 13:18:09
没有任何功能可以通过下拉菜单来更改这些,但是,它们都可以使用代码进行更改。
首先要注意的是,Simulink作用域只是一个伪装的MATLAB图形窗口,因此,一旦您有了要操作的作用域块的句柄,就可以使用标准的Handle Graphics命令来操作它。
例如,要更改图例的大小,请执行以下操作:
% Get the Name of the block you want to change
scope_name = get_param(gcb,'Name');
% Get the handle of the figure window used for the scope
hs = findall(0,'Tag','SIMULINK_SIMSCOPE_FIGURE','Name',scope_name);
% Get the handle to the axes on the scope
% (For simplicity, here we'll assume there is only one axis on the scope.
% If there are multiple axes, then you'll need to select which one to manipulate.)
ha = findall(hs,'Type','Axes');
% Get the handle to the legend
hl = get(ha,'Legend');
% Change the font size
set(hl,'FontSize',12);
给定上述任一句柄,您都可以使用set
和get
操作它,就像任何Handle Graphics对象一样。
https://stackoverflow.com/questions/46466020
复制相似问题