From: John H. <jdh...@ac...> - 2004-06-02 14:03:45
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> Hi, Is there a way to set the color of an histogram? what Flavio> about transparency ? Flavio> for example: Flavio> h=hist(x... set(h,'alpha',0.75) Of course, not all backends support the alpha channel (eg postscript), but this is already possible with the agg backend Here is some example code n, binsb, pb = hist(sb, 100,normed=True) set(pb, 'facecolor', 'r', 'alpha', 1.0) Perhaps the problem with your test code above is that histogram returns a tuple of (counts, bins, patches) and you need to set the alpha on the patches only. Flavio> I would like to superimpose histograms on the same plot Flavio> but they would have to be of different colors and be Flavio> translucent. Flavio> I need to do this in using the matlab interface, not the Flavio> API. Yep, I've done exactly this before using the code above; here's an example image where one histogram is translucent gray superimposed over a red histogram http://nitace.bsd.uchicago.edu:8080/files/share/aptopower.png JDH |