Font and picture size in live script

16 views (last 30 days)
Andhy
Andhy on 23 Jul 2023
Edited: Angelo Yeo on 24 Jul 2023
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.

Answers (1)

Angelo Yeo
Angelo Yeo on 24 Jul 2023
Edited: Angelo Yeo on 24 Jul 2023
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.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!