Hi everyone,
I'm currently experiencing an issue where Matlab won't let me save a figure as .fig. I've tried saveas, savefig or manually saving the figure. It doens't even give me an error message it just doesn't create a file.
Does anyone know why this happens or how to fix it?

4 commentaires

Star Strider
Star Strider le 12 Fév 2024
It might help if you post the code you use to create and save the figure.
Dominik Rohrbach
Dominik Rohrbach le 12 Fév 2024
Modifié(e) : Dominik Rohrbach le 12 Fév 2024
figure;
plot(1:10, rand(1, 10))
savefig('myFigure.fig');
Just something as basic as this doesn't seem to be working. Even if i open the figure in the figure Window and try to "save as" or export nothing happens. Not even an error message.
however, it works just fine if I try to save as png, jpg or any other format
Star Strider
Star Strider le 12 Fév 2024
I believe .fig files are saved as .mat files. Can you save .mat files?
Joe Vinciguerra
Joe Vinciguerra le 13 Fév 2024
Is it possible that your operating system is hiding .fig files?

Connectez-vous pour commenter.

 Réponse acceptée

Steven Lord
Steven Lord le 12 Fév 2024
Let's make sure you haven't created your own savefig.m that is taking precedence over the savefig function that is part of MATLAB. What does this command show?
which -all savefig
/MATLAB/toolbox/matlab/graphics/objectsystem/savefig.m
If you see your own function ahead of the one in toolbox/matlab/graphics/objectsystem, rename your function.

1 commentaire

Dominik Rohrbach
Dominik Rohrbach le 14 Fév 2024
Thank you that solved it!
I had a toolbox installed which seems to have overwritten the savefig function

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Printing and Saving dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by