|
From: Ryan M. <rm...@gm...> - 2009-05-06 18:06:05
|
2009/5/6 Carlos "Guâno" Grohmann <car...@gm...> > Dears, I was wondering if I can use a custom colortable in a > histogram, to get something like this: > > http://grass.itc.it/grass64/manuals/htm/r_surf_gauss_hist.png<http://grass.itc.it/grass64/manuals/html64_user/r_surf_gauss_hist.png> Not directly, but you could do it by hand. hist returns (among other things) a list of rectangle patches that represent all the bars. You could set the face/edge color of each of the patches based on the value of the histogram. This example appears to do what you want: http://matplotlib.sourceforge.net/examples/pylab_examples/hist_colormapped.html For the other devs: This would be easier if hist just returned a collection of rectangles. Why again does histogram just use a list of rectangles? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |