I've added some functionality to my copy hexbin, and I thought I'd
bounce it off folks (esp. Michael) to see if it seems like a good idea
to add it to MPL.
Here's the beginning of the docstring of the new version. What I've
added is the optional argument "C" -- inspired by scatter's "c" argument.
hexbin(x, y, C = None, gridsize = 100, bins = None,
xscale = 'linear', yscale = 'linear',
cmap=None, norm=None, vmin=None, vmax=None,
alpha=1.0, linewidths=None, edgecolors='none'
reduce_C_function = np.mean,
Make a hexagonal binning plot of *x* versus *y*, where *x*,
*y* are 1-D sequences of the same length, *N*. If *C* is None
(the default), this is a histogram of the number of occurences
of the observations at (x[i],y[i]).
If *C* is specified, it specifies values at the coordinate
(x[i],y[i]). These values are accumulated for each hexagonal
bin and then reduced according to *reduce_C_function*, which
defaults to numpy's mean function (np.mean). (If *C* is
specified, it must also be a 1-D sequence of the same length
as *x* and *y*.)
What do you think? I've also implemented a simple demo making use of
this functionality and an image of the output of the demo. For my own
selfish reasons, I'd love if we could stick this in 0.98.3, but I'm also
happy to hold off to get the release out the door.
hexbin.patch (7.19 KB)