MCPcopy Create free account
hub / github.com/holoviz/hvplot / hexbin

Method hexbin

hvplot/plotting/core.py:662–740  ·  view source on GitHub ↗

The `hexbin` plot uses hexagons to split the area into several parts and attribute a color to it. `hexbin` offers a straightforward method for plotting dense data. Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.hexbin.html Plotting opti

(
        self,
        x=None,
        y=None,
        C=None,
        colorbar=True,
        gridsize=50,
        logz=False,
        min_count=None,
        **kwds,
    )

Source from the content-addressed store, hash-verified

660 return self(x, y, kind='heatmap', C=C, colorbar=colorbar, logz=logz, **kwds)
661
662 def hexbin(
663 self,
664 x=None,
665 y=None,
666 C=None,
667 colorbar=True,
668 gridsize=50,
669 logz=False,
670 min_count=None,
671 **kwds,
672 ):
673 """
674 The `hexbin` plot uses hexagons to split the area into several parts and attribute a color
675 to it.
676
677 `hexbin` offers a straightforward method for plotting dense data.
678
679 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.hexbin.html
680
681 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
682
683 Parameters
684 ----------
685 x : string, optional
686 Field name to draw x coordinates from. If not specified, the index is used.
687 y : string
688 Field name to draw y-positions from
689 C : string, optional
690 Field to draw hexbin color from. If not specified a simple count will be used.
691 colorbar: boolean, optional
692 Whether to display a colorbar. Default is True.
693 reduce_function : function, optional
694 Function to compute statistics for hexbins, for example ``np.mean``.
695 Default aggregation is a count of the values in the area.
696 gridsize: int or tuple, optional
697 Number of hexagonal bins along x- and y-axes. Defaults to uniform
698 sampling along both axes when setting and integer but independent
699 bin sampling can be specified a tuple of integers corresponding to
700 the number of bins along each axis. Default is 50.
701 logz : bool
702 Whether to apply log scaling to the z-axis. Default is False.
703 min_count : number, optional
704 The display threshold before a bin is shown, by default bins with
705 a count of less than 1 are hidden
706 **kwds : optional
707 Additional keywords arguments are documented in :ref:`plot-options`.
708 Run ``hvplot.help('hexbin')`` for the full method documentation.
709
710 Returns
711 -------
712 :class:`holoviews:holoviews.element.HexTiles` / Panel object
713 You can `print` the object to study its composition and run:
714
715 .. code-block::
716
717 import holoviews as hv
718 hv.help(the_holoviews_object)
719

Callers 1

test_geo_hexbinMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_geo_hexbinMethod · 0.36