exportgraphic crops the 10^N of scientific notation of the tickvalues
4 次查看(过去 30 天)
显示 更早的评论
Hi all,
I am running at an annoying issue on the exportgraphic. Here is a simplified example.
X = 1:10;
Y = 10000*X;
plot(X,Y)
exportgraphics(gcf,'myfigure1.jpg','Resolution',300)
After exporting, the 10^N of scientific notation of the y-axis tickvalues is cropped. Can anyone give some advice?
0 个评论
采纳的回答
Animesh
2024-5-9
This seems to be a bug in MATLAB R2024a. One possible workaround could be to use saveas function instead of exportgraphics.
saveas(gcf, 'myfigure1.jpg');
You can refer the following MathWorks documentation for more information on saveas function:
Hope this solves your issue.
3 个评论
Animesh
2024-5-9
You can try print function if you want to set the resolution of the figure.
print(gcf,'myfigure1.png','-dpng','-r300'); %300dpi
Here, -r300 option sets the resolution of the figure to 300dpi.
You can refer the following documentation: https://www.mathworks.com/help/releases/R2024a/matlab/ref/print.html
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!