Borrar filtros
Borrar filtros

Exporting plot to EPS ignores clipping definition

2 visualizaciones (últimos 30 días)
Sebastião Beirão
Sebastião Beirão el 14 de Oct. de 2021
Editada: prabhat kumar sharma el 3 de Abr. de 2024
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.

Respuestas (1)

prabhat kumar sharma
prabhat kumar sharma el 3 de Abr. de 2024
Editada: prabhat kumar sharma el 3 de Abr. de 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!

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by