Effacer les filtres
Effacer les filtres

Exporting plot to EPS ignores clipping definition

2 vues (au cours des 30 derniers jours)
Sebastião Beirão
Sebastião Beirão le 14 Oct 2021
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.

Réponses (1)

prabhat kumar sharma
prabhat kumar sharma le 3 Avr 2024
Modifié(e) : prabhat kumar sharma le 3 Avr 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');
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!

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by