how to make a transparent histogram in matlab
to make a partially transparent histogram in matlab, use the facealpha setting.
for instance, the following code produces the histogram seen above:
figure
hist(data1,20)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','w','facealpha',0.75)
hold on
hist(data2,20)
h = findobj(gca,'Type','patch');
set(h,'facealpha',0.75);
ylabel('counts')
xlabel('gene-tree-length/species-tree-length')
legend('no HGT','HGT')
title('p = 0.5');
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home