Exporting plot to EPS ignores clipping definition
3 次查看(过去 30 天)
显示 更早的评论
I'm trying to export the figure attached to EPS which has more data than the one showed (I have limited the x range with xlim) and the exported EPS file shows an extension of the graph. This does not happened if I export to PNG.
What can I do to fix this? It seam like a matlab bug because I have not encountered this problem in the other plots I made with similar data.
0 个评论
回答(1 个)
prabhat kumar sharma
2024-4-3
编辑:prabhat kumar sharma
2024-4-3
Hi Sebastiao,
I understand that you're encountering an issue with exporting figures to EPS format in MATLAB—where the exported EPS file does not respect the xlim settings and shows more data than intended—here are some steps and workarounds you can try to resolve the issue:
1.Use print Function with Tight Bounding Box
When exporting the figure to EPS, using the print function with the -loose bounding box option may help control the output.
print('YourFigureName.eps', '-depsc', '-tiff', '-loose'); % Loose might work better in some cases
% or
print('YourFigureName.eps', '-depsc', '-tiff');
You can go through this answer also for refrence: https://www.mathworks.com/matlabcentral/answers/553606-how-to-export-high-quality-plot-in-eps-format
2. Rendrer issue : This behavior could be most likely due to the renderer. : https://www.mathworks.com/matlabcentral/answers/92521-why-does-matlab-not-export-eps-files-properly
I hope it helps to resolve your issue!
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!