PATCH and FILL affect figure axes and graphics quality
12 views (last 30 days)
Show older comments
Dear all,
PATCH and FILL seem to affect the figure axes and graphics quality of a figure subsequently saved as a pdf or eps. Try generating the following figures and saving them as a pdf
1)
s = randn(1,501);
figure, plot([-100:400],s);
axis tight
2)
s = randn(1,501);
figure, plot([-100:400],s);
X = [100 100 150 150];
Y = [-(max(s)) (max(s)) (max(s)) -(max(s))];
patch(X,Y,'k','FaceAlpha',0.09,'EdgeAlpha',0.09);
axis tight
In the first plot, the axes are normal and the quality of the saved pdf is superb. In the plot using PATCH or FILL, the axes behave differently and the graphics quality of the pdf is dramatically affected.
Does anyone have a clue why this is happening ?
Best wishes, Martin
0 Comments
Answers (1)
Jan
on 20 May 2011
PATCH and FILL set the Renderer of the figure to "OpenGL", if the RendererMode is 'auto'. The Painters and ZBuffer renderers cannot display transparency, so your example needs OpenGL for rendering - and enables it automatically.
While PDFs contain scalable vector drawings with the Painters renderer, with OpenGL only pixel graphics are exported, which usually look less nice. Be aware, that there is no transparency property in the EPS format. Even the display of patches intersecting in 3D is not well defined. Therefore a pixel-graphics export is the best solution.
You can use the -r argument for PRINT to increase the resoltion.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!