Matlab R2018a does not save the whole figure
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Orestis Stylianou
am 21 Jan. 2020
Bearbeitet: Orestis Stylianou
am 22 Jan. 2020
Hello,
I am working on some scripts that use this function (with some modifications). While the script is running the figure appears as expected. But when I export it, some parts of it are missing. I have tried
print(gcf, namem,'-dtiffn','-r600')
as well as manual export via the GUI. I keep getting the exact same parts cropped. What could be the issue? This is the 1st time facing such a weird problem.
2 Kommentare
BN
am 21 Jan. 2020
Bearbeitet: BN
am 21 Jan. 2020
I have the same problem a few weeks ago. I told you what I've done, maybe useful for you. I'm worked with Matlab R2018b.
I was saved my work and close Matlab, then Restart the computer. after that I use:
clear all
close all
clc
Then I run my code from the first part again. After that everything was fixed for me.
I was saving the figure using this command:
DirectoryPath ='C:\Users\Behzad\Desktop\Figures';
whereToStore=fullfile(DirectoryPath,['filename', '.png']);
saveas(gcf, whereToStore);
I hope it helps you because I have exact same problem and it worked for me.
BN
am 21 Jan. 2020
Dear Orestis,
fh = figure() %your figure
set(fh, 'Visible','off');
Akzeptierte Antwort
Orestis Stylianou
am 22 Jan. 2020
1 Kommentar
Orestis Stylianou
am 22 Jan. 2020
Bearbeitet: Orestis Stylianou
am 22 Jan. 2020
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!