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

Method kde

hvplot/plotting/core.py:1107–1177  ·  view source on GitHub ↗

The Kernel density estimate (`kde`) plot shows the distribution of the data. The KDE works by placing a Gaussian kernel at each sample with the supplied bandwidth, which are then summed to produce the density estimate. By default the bandwidth is determined using th

(self, y=None, by=None, **kwds)

Source from the content-addressed store, hash-verified

1105 )
1106
1107 def kde(self, y=None, by=None, **kwds):
1108 """
1109 The Kernel density estimate (`kde`) plot shows the distribution of the data.
1110
1111 The KDE works by placing a Gaussian kernel at each sample with the supplied
1112 bandwidth, which are then summed to produce the density estimate. By default
1113 the bandwidth is determined using the Scott's method, which usually produces
1114 good results, but it may be overridden by an explicit value.
1115
1116 ``density`` is an alias of ``kde``.
1117
1118 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.kde.html
1119
1120 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
1121
1122 Parameters
1123 ----------
1124 y : string or sequence
1125 Field(s) in the data to compute distribution on. If not specified all numerical fields
1126 are used.
1127 by : string or sequence
1128 Field(s) in the data to group by.
1129 bandwidth : float, optional
1130 Allows supplying explicit bandwidth value of the kernel for the
1131 density estimate, rather than relying on Scott. Higher value
1132 yields smoother contours. Default is None.
1133 cut : float, optional
1134 Draw the estimate to cut * bw from the extreme data points. Default is 3.
1135 filled :
1136 Whether the bivariate contours should be filled. Default is True.
1137 bw_method : optional
1138 Not supported.
1139 ind : optional
1140 Not supported.
1141 kwds : optional
1142 Additional keywords arguments are documented in :ref:`plot-options`.
1143 Run ``hvplot.help('kde')`` for the full method documentation.
1144
1145 Returns
1146 -------
1147 :class:`holoviews:holoviews.element.Distribution` / Panel object
1148 You can `print` the object to study its composition and run:
1149
1150 .. code-block::
1151
1152 import holoviews as hv
1153 hv.help(the_holoviews_object)
1154
1155 to learn more about its parameters and options.
1156
1157 See Also
1158 --------
1159 hist : Histogram plot.
1160 bivariate : 2D KDE plot.
1161 contour : Isolines plot for gridded data.
1162
1163 References
1164 ----------

Callers 1

test_kde_optsMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_kde_optsMethod · 0.36