I saw this question asked earlier, but there seems to be no solution, so it's just interesting if this is possible at all.
I have a stroke chart in MatLab and set the transparency:
B = bar(x,y,'stacked');
set(B(1),'facecolor',[0 0.3906 0])
set(B(2),'facecolor',[0.5625 0.9297 0.5625])
ch1 = get(B(1),'child');
set(ch1,'facea',.5)
ch2 = get(B(2),'child');
set(ch2,'facea',.5)
And I would like the transparency in the plot reflected in the legend:
BL = legend ((B([1 2])),{'data1','data2'},'fontsize',10);
However, the alpha value in the legend seems to be 1.
Any ideas? Thank.
source
share