exportgraphics r2020a issue
2 次查看(过去 30 天)
显示 更早的评论
I am using exportgraphics command to export hihg quality images.
exportgraphics(gcf,[filenames(1:end-4),'.tiff'], 'Resolution', 300);
Bur, exported image output as attached here. for some reason, part of the screen is saved as black. does anybody know the solution? Kinldy help.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305107/image.png)
if i use
saveas(gcf,filenames(1:end-4),'tiff');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/305115/image.png)
2 个评论
Richard Quist
2020-6-1
编辑:Richard Quist
2020-6-1
MS,
That is certainly not the expected behavior. Please report this to MathWorks Technical Support so this can be looked into. It will help if you can provide reproduction steps and information about how you are running MATLAB (startup options, platform/OS, machine configuration, etc). Since you mentioned that it was working properly until a few days ago, it might help if you are able to identify what might have changed... did you update your hardware or software? Did you change machines? ...
Thanks
回答(1 个)
Ameer Hamza
2020-5-29
编辑:Ameer Hamza
2020-5-29
I didn't face this problem in R2020a update 2, however, I remember observing something like this (not exactly sure if it was exportgraphics). Have you installed update 2? Alternatively, I suggest using this excellent package by Yair on FEX: https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig. I have found that this usually gives a better output as compared to the built-in function from MATLAB. Download this and add it to MATLAB's path and run it like this
export_fig(gcf,[filenames(1:end-4),'.tiff'], '-r300');
3 个评论
Ameer Hamza
2020-5-29
Your exportgraphics command is correct. But have you installed update 2 for R2020a?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!