
Hi all,
Recently I experimented how plt.hexbin works.
I read a little bit about the history of this method of binning, and I'm curious how it was implemented in matplotlib.
Could someone, please, point out where in /sitepackages/matplotlib is implemented the construction of the prototypical hexagon returned by:
plt.hexbin(x, y, gridsize=25, cmap=my_cmap, mincnt=1).get_paths()
as well as the computation of the PolyCollection offsets?
I ran my code in a Jupyter notebook and noticed that if I don't set %matplotlib inline, then the
PolyCollection instance
HB=plt.hexbin(x, y, gridsize=25, cmap=my_cmap, mincnt=1)
has only one facecolor initialized, i.e. len(Hb.get_facecolors())=1, while len(HB.get_offsets())=300.
Is there a posibility to generate the facecolors without effective plotting of the hexbin object?
Thanks,
Em
