Why is there a discrepancy between and screen and .eps versions of images generated with the painters renderer? (Mac OS10.11.6, Matlab 2013b)
3 次查看(过去 30 天)
显示 更早的评论
Hi,
Here is my problem.
- I need to produce a transparent surface and save it to an eps file; this is a requirement of a publisher and no other file format will do.
- When producing this figure I have to use the painters renderer because it is the only one that produces vector output.
- I can’t use mesh or surf because the resulting surfaces will be opaque; if one changes the α of the surface then the opengl renderer is invoked and the resulting image is pixel based rather than vector based.
- I can’t use Matlab 2014 or later because changes to the vector graphics rendering makes the output unusable.
- I have a (not great but usable) workaround in Matlab 2013b that uses plot3 or scatter3. Figure A shows this solution as it appears on the screen and as it shows up in a jpeg file. This is what I want the figure to look like, but I want the output to be vectors so that the image will scale with the resolution of the output device.
- Figure B shows what the figure looks like when saved as an eps file. This is not what appears on the screen so something about the writing routine is wrong, or there is some flag that I’m unaware of. (The same discrepancy occurs when I use export_fig.)
- Note that even though the surface (smaller) symbols and the larger plot symbols were all generated with plot3, in the eps file the larger plot symbols properly occlude the smaller ones but not vice versa. This is the problem.
Can anybody tell me why this discrepancy between the screen version and eps version occurs?
Thanks very much,
Rick
Figure A. The image as it appears on the screen and when saved as a jpeg
Figure B. The image as it appears when saved to an eps file.
0 个评论
回答(1 个)
Saurabh Gupta
2016-9-23
Hello Rick,
It is possible that MATLAB switches to OpenGL or ZBuffer renderer while saving your figure as an EPS file. This happens when the RendererMode is 'auto' and MATLAB considers the figure to be “too complex” for a vectorized output.
Make sure that you set the RendererMode as 'manual' and the Renderer as ‘Painters’ before saving the figure to your EPS file.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!