Home > front end >  How to modify the facecolors of hexbin plots?
How to modify the facecolors of hexbin plots?

Time:11-12

I'm looking for a way to fine tune the color of individual cells in a hexbin plot.

I have tried to use the method set_facecolors from Hexbin plot should feature a red cell in its center

Any idea on how to set the facecolor of individual cells?

CodePudding user response:

Normally, the colors are set via a colormap (hence the C=z parameter in ax.hexbin()). To change individual colors, you need to disable that behavior. That can be achieved by setting the "array" of the PolyCollection to None (see also Joe Kington's answer changing individual colors in a hexbin

  • Related