Send As SMS

7/18/2006

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

My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.