Why do colors "gray out" when I save figure as .eps

32 visualizaciones (últimos 30 días)
Heidi Hirsh
Heidi Hirsh el 1 de Jul. de 2020
Respondida: Bjorn Gustavsson el 3 de Jul. de 2020
I am trying to save a figure as an EPS file so that I can open it in Adobe Illustrator. When I save my figure most of the colors go away and I cannot figure out why. I am using this line to save it as a .eps file:
print(gcf,'-depsc','-painters','PKspectra.eps')
I cannot attach a .eps file here so I took a screenshot instead showing the figure as it plots in matlab and the resultant .eps figure. I hope someone can help!
  1 comentario
Bhuvanyu Dogra
Bhuvanyu Dogra el 3 de Jul. de 2020
Hey,
from the description of the problem, it seems it could possibly be a rendering issue due to which the files are not exported correctly. Have a look at the following discussion.

Iniciar sesión para comentar.

Respuestas (1)

Bjorn Gustavsson
Bjorn Gustavsson el 3 de Jul. de 2020
Ah, from the way your figure looks, it seems the "error-shade" function you use uses alpha-blending - that is colour-patches that are semi-transparent. The painters renderer doesn't cope well (or at all) with that. For this you might get a decent figure if you select the opengl renderer instead of painters - with the drawback of getting a pixel-mapped file. Maybe you can squeeze around the problem if you write the figure to an svg-file first and then convert it to eps from some other application (inkscape?).
(I typically have to fall back to writing it as a high-resolution png-image and then convert is to eps in gimp or the like, and hope that text and lines and such come out OK...)
HTH

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