Font and picture size in live script

18 次查看(过去 30 天)
Hello, my teacher shared us a live script file and I noticed that the size of the picture and the font changes when I run the code in my computer, the picture originally is big and when I run the code, the size of the picture is small. I want to know why this happens. I share the file .mlx. And I shared you a picture showing the difference between the two pictures.

回答(1 个)

Angelo Yeo
Angelo Yeo 2023-7-24
编辑:Angelo Yeo 2023-7-24
I believe this has something to do with the default figure position setting of your teacher's computer.
If you want to increase the figure size, you can add such scripts to line 55 and 56.
fig = gcf;
fig.Position(3:4) = [200, 150]; % 200 and 150 can be replaced with the width and height you want.
This will change the figure size as shown below.
If you want to change the default figure position setting in your MATLAB, consider using such scripts.
set(groot, 'DefaultFigurePosition', [x,y,width,height])
% To reset:
% set(groot, 'DefaultFigurePosition', 'factory')
Lastly, you can open the figure in a new window and enlarge it.

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by