Hi folks, I'm interested in hearing some strategies for plotting two histograms on the same plot. My goal is to visualize and compare two distributions which have similar shapes.
My first attempt was to use alpha, but this isn't well support on PS2 output driver (surprising) and I will be including these in a paper, so having a good print output format like PS2 or PDF is desired. PDF seems to work ok, but the alpha model doesn't completely satisfy my in areas where the two plots overlap a good deal. import pylab, random d1 = [random.gauss(0, 1) for i in range(100)] d2 = [random.gauss(1, 1) for i in range(100)] color = ['r', 'g'] pylab.hist(d1, facecolor='r', edgecolor='black', alpha=0.75) pylab.hist(d2, facecolor='b', edgecolor='black', alpha=0.75) pylab.savefig('test.pdf') pylab.show() What ideas do other people have? My thought was to subdivide the plot into two subplots, and plot one distribution on top, and the other on the bottom, but this effectively halves my vertical resolution (I'm already plotting 24 subplots per page). Thanks, Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users