Export figure as EPS or PDF does not properly render some dotted lines; they become solid lines

20 visualizaciones (últimos 30 días)
When exporting a figure containing three plots to EPS or PDF format, the line styles on the third plot only do not render properly. The dotted lines become solid (see first image).
When exporting to a raster format, there is no distortion (see second image).
Does anyone know a fix for this? I much prefer a vector format. It seems weird that the first two plots look fine.

Respuestas (5)

Thomas Lindvall
Thomas Lindvall el 28 de Feb. de 2022
  1 comentario
Shyamprasad Natarajan Raja
Shyamprasad Natarajan Raja el 20 de Sept. de 2023
I had to create a PDF file from a figure with many data points. Plotting worked fine on matlab, but using exportgraphics() took a terribly long time. export_fig was almost instantaneous and produced the expected output. Great recommendation!

Iniciar sesión para comentar.


Georges Chahine
Georges Chahine el 29 de Abr. de 2022
Editada: Georges Chahine el 29 de Abr. de 2022
I was able to solve it by downsampling the data. Keep downsampling till you no longer have the issue. Example on 50% downsampling rows: B=A(1:2:end,:)
  1 comentario
Ding Ding
Ding Ding el 13 de Jun. de 2022
Downsampling works! It seems that if the sampling points on a curve are too dense, they will be processed into a solid line.

Iniciar sesión para comentar.


Thomas Lindvall
Thomas Lindvall el 6 de Mzo. de 2020
I have the same issue in R2018a.

Georges Chahine
Georges Chahine el 26 de Feb. de 2022
same issue

Ding Ding
Ding Ding el 29 de Abr. de 2022
same issue in R2021a

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by