hexbin#

caf.viz.xy_plot.hexbin(fig, ax, data, *, cmap=None, gridsize=50, colorbar=True)[source]#

Add hexbin plot to given ax and add colorbar to fig.

Parameters:
  • fig (figure.Figure) – Figure containing the plot Axes.

  • ax (axes.Axes) – Axes to add hexbin plot to.

  • data (BasicData) – Data for creating the hexbin plot.

  • cmap (CmapData, optional) – Data for defining the hexbin colormap.

  • gridsize (int, default 50) – Number of hexagons in the x-direction, i.e. width of the hexbin grid.

  • colorbar (bool, default True) – If True add colorbar to fig.

Raises:

KeyError – If colormap data column isn’t present in data.data.

Return type:

None