Exporting plot to EPS ignores clipping definition
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
prabhat kumar sharma
on 3 Apr 2024
Edited: prabhat kumar sharma
on 3 Apr 2024
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 Comments
See Also
Categories
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!