Borrar filtros
Borrar filtros

Can export_fig or else draw vector graphics with transparent surfaces?

4 visualizaciones (últimos 30 días)
Qiu
Qiu el 26 de En. de 2016
Editada: Mike Garrity el 26 de En. de 2016
Hi,
I used export_fig() to export an .eps image containing transparent surfaces, then inserted it in MS Word and converted to PDF by Adobe Acrobat, but in the final PDF, all transparency disappeared.
It's suggested here that only -opengl option can render transparent patch objects, unfortunately only for bitmaps. So is there any solution to export an vector graphic with transparent objects?

Respuestas (1)

Mike Garrity
Mike Garrity el 26 de En. de 2016
I'm sure that Yair (the author of export_fig) will show up at some point with some good advice, but my understanding is that export_fig goes through PostScript to get to all of the vector file formats. That's an issue in this case because the PostScript format does not support transparency, while PDF does. This means that the transparency gets lost because of going through PostScript.
If you're using R2014b or later, you might try using the print command instead. Starting in that release, the PDF writer doesn't go through PostScript, so it can support transparency.
[x,y,z] = sphere(12);
surf(x,y,z,'FaceAlpha',.5,'FaceColor',[.466 .674 .188],'EdgeColor','none')
camlight
print -dpdf print.pdf
It's got some issues of its own, but it might do what you need.
  2 comentarios
Qiu
Qiu el 26 de En. de 2016
Thanks for your answer.
It works for PDF, but when I used Inkscape to convert the PDF to eps file, transparency still disappeared.
Many scientific publishers only accept eps format for vector graphics, so any advice for converting PDF to eps with transparency remained?
Mike Garrity
Mike Garrity el 26 de En. de 2016
Editada: Mike Garrity el 26 de En. de 2016
That's because EPS is a PostScript format. PostScript doesn't support transparency.
Here's Adobe's how-to guide on the subject.

Iniciar sesión para comentar.

Categorías

Más información sobre Lighting, Transparency, and Shading 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