
Can export_fig or else draw vector graphics with transparent surfaces?
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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?
0 comentarios
Respuestas (1)
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
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.
Ver también
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!