I am creating a figure which contains transparent objects. I am printing this figure as a PDF file using the PRINT command. I am using the OpenGL renderer to render the output PDF. I notice pixelation in the output both on the content of the axes as well as the axes labels, legends and ticks.
The code used to generate the figure is below. The problem is not specific to the objects being drawn. It depends on the rendering mode used in the PRINT command.
h = patch([0 1 0.6], [0 1 0.8], 0.85*[0,1,0]); set(h,'FaceAlpha', 0.65, 'EdgeColor',[0,0,0],'EdgeAlpha',1, 'LineWidth',2);h = patch([0 0.6 0.6], [0 0.2 0.8], 0.5*[0,1,0.5]);set(h,'FaceAlpha', 0.65, 'EdgeColor',[0,0,0],'EdgeAlpha',1, 'LineWidth',2, 'LineStyle','-.');xlabel('X-axis'); ylabel('Y-Axis'); title('Title'); grid onlegend({'Patch1', 'Patch2'});print(gcf, '-opengl', '-dpdf', 'pdf_opengl.pdf');
Best Answer