Why does the aspect ratio of a figure change after copy pasting the figure in PowerPoint using "Copy Figure" in MATLAB R2025a?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 3 Ott 2025
Risposto: MathWorks Support Team
il 10 Ott 2025 alle 13:28
In previous versions of MATLAB (R2024b and earlier), when I copied a figure and pasted it into PowerPoint, the aspect ratio matched the one I had set.
The expected behavior is that copying a MATLAB figure and pasting it into PowerPoint should preserve the aspect ratio. However, what I observe in MATLAB R2025a is that the aspect ratio is not maintained when I paste the figure into PowerPoint.
Here is an example of the aspect ratio difference I noticed after pasting the figure into PowerPoint (with "Match on-screen size" enabled):
set(gcf, "units", "inches", "position", [0, 0, 6, 4])
I would expect the figure to have an aspect ratio of 1.5 (6-by-4), but in PowerPoint, it appears as 1.405 (6-by-4.27).
How can I ensure that the figure I copy into PowerPoint keeps exactly the same aspect ratio as I have set in MATLAB R2025a?
Risposta accettata
MathWorks Support Team
il 3 Ott 2025
The difference that you are seeing between MATLAB R2025a and earlier versions is due to changes in how MATLAB copies figures. In MATLAB R2025a, MATLAB uses a new method for copying figures that crops the image more tightly by default, which can change the aspect ratio compared to previous versions.
At this time, the Copy Figure tool in MATLAB R2025a does not let you adjust this cropping, so the aspect ratio might not match what you set in the figure window.
However, as a workaround, you can get the old behavior by using a command in MATLAB called “copygraphics”.
If you run the following command in the MATLAB Command Window:
copygraphics(gcf, 'Padding', 'figure')
It will copy the figure with the same aspect ratio as before.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MATLAB Report Generator in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!