How to make pie charts with transparency on matlab? -
i having trouble while adding transparency pie charts. can't set using facealpha
or edgealpha
, using alpha alone kind of rips edges of chart when compiling eps file.
any tips?
figure; subplot(1,2,1) h=pie3(p1,[0 0 0 1 1]) set(h,'edgecolor','none','linestyle','none') hold on colormap cool hold on subplot(1,2,2) h=pie3([pf pg],[1 0 ],{'x1','x2'}) set(h,'edgecolor','none') colormap cool %alpha(0.5) print teste -depsc2
the output of pie3
array of handles. handles surfaces, patches, , others text. need select sub-set of these handles have edgealpha
, facealpha
properties. can using findobj
.
h = pie3(rand(1,5), [0 0 0 1 1]); set(findobj(h, '-property', 'facealpha'), 'facealpha', 0.2); set(findobj(h, '-property', 'edgealpha'), 'edgealpha', 0);
when exporting eps though, transparency not supported. also, since have transparency in figure, matlab use opengl renderer causes eps files not rendered expect. try use export_fig
better result.
Comments
Post a Comment