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 /site-packages/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?
There is surely some infrastructure below that, but the link above is the
entrance to the rabbit hole.
Is that what you needed?
-p
···
On Wed, Mar 30, 2016 at 7:41 AM, empet <emilia.petrisor at gmail.com> wrote:
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 /site-packages/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?