Stop Windows MATLAB adjusting figure's position and size

15 visualizzazioni (ultimi 30 giorni)
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 Commenti
Cunxin
Cunxin il 20 Gen 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 il 21 Gen 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?

Accedi per commentare.

Risposte (1)

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

Categorie

Scopri di più su Printing and Saving in Help Center e File Exchange

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by