# PGFPlotsX: Hexagonal binning

**URL:** <https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580>\
**Category:** General Usage\
**Tags:** visualization, pgfplotsx\
**Created:** [November 27, 2019, 2:23pm UTC](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580 "2019-11-27T14:23:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fipelle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fipelle/32/4772_2.png) [@fipelle](https://discourse.julialang.org/u/fipelle)\
**Post date:** [November 27, 2019, 2:23pm UTC](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580/1 "2019-11-27T14:23:59Z")

</div>

Do you know of any gallery for PGFPlots that include an exagonal binning chart similar to [Has anyone made scatter plots with hexagonal binning?](https://discourse.julialang.org/t/has-anyone-made-scatter-plots-with-hexagonal-binning/12909)?

An example / gallery in LaTeX would also work.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [November 27, 2019, 6:08pm UTC](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580/2 "2019-11-27T18:08:44Z")

</div>

The most relevant thing I could find is [tikz pgf - Zooming on a data set in a picture (magnifying glass) - TeX - LaTeX Stack Exchange](https://tex.stackexchange.com/a/42442) where the binning is done in a separate library and then the bins are rendered with quite low level pgfplots code.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 28, 2019, 7:04am UTC](https://discourse.julialang.org/t/pgfplotsx-hexagonal-binning/31580/3 "2019-11-28T07:04:14Z")

</div>

As for the calculation, there is

[https://github.com/GiovineItalia/Hexagons.jl](https://github.com/GiovineItalia/Hexagons.jl)

(which I assume needs to be dusted off a bit), the plotting can be done with patches (for which we have rudimentary support).

Making patches more user-friendly is on my agenda, I just don’t have the bandwidth in the medium run.
