Can't open figure when saving with 'saveas',
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I'm saving a figure as a .png and a .fig file. It generates the files, and the png file works fine to open, but I am unable to open the .fig-file (neither through importing it using the file menu or double clicking it). Here is the part of my code which saves the plot:
scplot=figure('Visible','off');
saveas(scplot,[paths{1} '\Flood Frequency Analysis Files\' today '\' sheets{n} '\Scatter_plot_of_annual_max_' sheets{n} '_Matlab_Plot.fig'])
saveas(scplot,[paths{1} '\Flood Frequency Analysis Files\' today '\' sheets{n} '\Scatter_plot_of_annual_max_' sheets{n} '_Image.png'])
The paths are a bit messy, but the files are saves in the right Place with the right format, and as I said the second saveas returns a functioning .png image.
I've tried using savefig instead of saveas and it gave the same error. Using saveas or savefig in the command line works fine, it's just in my function that it doesn't work.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Printing and Saving en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!