diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 1e1b4347bb22..e502d3b8ec6a 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -6462,21 +6462,21 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, - If int, the number of bins for the two dimensions (nx=ny=bins). - - If [int, int], the number of bins in each dimension + - If ``[int, int]``, the number of bins in each dimension (nx, ny = bins). - If array_like, the bin edges for the two dimensions (x_edges=y_edges=bins). - - If [array, array], the bin edges in each dimension + - If ``[array, array]``, the bin edges in each dimension (x_edges, y_edges = bins). The default value is 10. range : array_like shape(2, 2), optional, default: None The leftmost and rightmost edges of the bins along each dimension - (if not specified explicitly in the bins parameters): [[xmin, - xmax], [ymin, ymax]]. All values outside of this range will be + (if not specified explicitly in the bins parameters): ``[[xmin, + xmax], [ymin, ymax]]``. All values outside of this range will be considered outliers and not tallied in the histogram. normed : bool, optional, default: False @@ -6510,31 +6510,32 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, Other Parameters ---------------- cmap : Colormap or str, optional - A :class:`matplotlib.colors.Colormap` instance. If not set, use rc - settings. + A `.colors.Colormap` instance. If not set, use rc settings. norm : Normalize, optional - A :class:`matplotlib.colors.Normalize` instance is used to + A `.colors.Normalize` instance is used to scale luminance data to ``[0, 1]``. If not set, defaults to - ``Normalize()``. + `.colors.Normalize()`. vmin/vmax : None or scalar, optional - Arguments passed to the `Normalize` instance. + Arguments passed to the `~.colors.Normalize` instance. alpha : ``0 <= scalar <= 1`` or ``None``, optional The alpha blending value. See also -------- - hist : 1D histogram + hist : 1D histogram plotting Notes ----- - Rendering the histogram with a logarithmic color scale is - accomplished by passing a :class:`colors.LogNorm` instance to - the *norm* keyword argument. Likewise, power-law normalization - (similar in effect to gamma correction) can be accomplished with - :class:`colors.PowerNorm`. + - Currently ``hist2d`` calculates it's own axis limits, and any limits + previously set are ignored. + - Rendering the histogram with a logarithmic color scale is + accomplished by passing a `.colors.LogNorm` instance to the *norm* + keyword argument. Likewise, power-law normalization (similar + in effect to gamma correction) can be accomplished with + `.colors.PowerNorm`. """ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range,