Stop Windows MATLAB adjusting figure's position and size

7 visualizaciones (últimos 30 días)
Cunxin
Cunxin el 20 de En. de 2025
Editada: 埃博拉酱 el 21 de En. de 2025
I am writing some MATLAB code to export some graphics, which is "large". I tested my code on Windows system and I found that the position and size of the figure were adjusted.
I looked up the Help Center and saw the note (figure properties) as follows.
The Windows operating system enforces a minimum window width and a maximum window size. If you specify a figure size outside of those limits, the displayed figure will conform to the limits instead of the size you specified.
I wonder if there is some approah can stop Windows from changing the figure or adjust the minimum window width and maximum window size on Windows MATLAB?
I also tried to modify the position and size back. But I noticed that Windows MATLAB will change it back when I use `exportgraphics` to save the figure.
  3 comentarios
Cunxin
Cunxin el 20 de En. de 2025
Sure. Try to run the following code in the directory where the attached 'fig.mat' stays.
load('fig.mat');
exportgraphics(fig, 'fig.pdf', 'ContentType', 'vector');
You will see the output pdf on Windows is different from that on Linux or MacOS.
The reason is what I mentioned above, but I don't know how to prevent it.
Rik
Rik el 21 de En. de 2025

Since the issue is not actually related to Matlab, have you tried looking for general Windows fora for advice on how to change these settings?

Iniciar sesión para comentar.

Respuestas (1)

埃博拉酱
埃博拉酱 el 21 de En. de 2025
Editada: 埃博拉酱 el 21 de En. de 2025
你试过print吗?我一般用print出图,基本没有遇到过尺寸限制问题。
print(load('fig.mat').fig,'fig.pdf','-dpdf');

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by