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!