Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 636a06d

Browse files
phobsontacaswell
authored andcommitted
Merge pull request matplotlib#11071 from dstansby/hist-scaling
Add note about hist2d resetting axis limits Conflicts: lib/matplotlib/axes/_axes.py - kept master branch version of docstrings
1 parent faf9684 commit 636a06d

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6855,21 +6855,21 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
68556855
- If int, the number of bins for the two dimensions
68566856
(nx=ny=bins).
68576857
6858-
- If [int, int], the number of bins in each dimension
6858+
- If ``[int, int]``, the number of bins in each dimension
68596859
(nx, ny = bins).
68606860
68616861
- If array_like, the bin edges for the two dimensions
68626862
(x_edges=y_edges=bins).
68636863
6864-
- If [array, array], the bin edges in each dimension
6864+
- If ``[array, array]``, the bin edges in each dimension
68656865
(x_edges, y_edges = bins).
68666866
68676867
The default value is 10.
68686868
68696869
range : array_like shape(2, 2), optional, default: None
68706870
The leftmost and rightmost edges of the bins along each dimension
6871-
(if not specified explicitly in the bins parameters): [[xmin,
6872-
xmax], [ymin, ymax]]. All values outside of this range will be
6871+
(if not specified explicitly in the bins parameters): ``[[xmin,
6872+
xmax], [ymin, ymax]]``. All values outside of this range will be
68736873
considered outliers and not tallied in the histogram.
68746874
68756875
normed : boolean, optional, default: False
@@ -6902,32 +6902,33 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
69026902
69036903
Other Parameters
69046904
----------------
6905-
cmap : {Colormap, string}, optional
6906-
A :class:`matplotlib.colors.Colormap` instance. If not set, use rc
6907-
settings.
6905+
cmap : Colormap or str, optional
6906+
A `.colors.Colormap` instance. If not set, use rc settings.
69086907
69096908
norm : Normalize, optional
6910-
A :class:`matplotlib.colors.Normalize` instance is used to
6909+
A `.colors.Normalize` instance is used to
69116910
scale luminance data to ``[0, 1]``. If not set, defaults to
6912-
``Normalize()``.
6911+
`.colors.Normalize()`.
69136912
6914-
vmin/vmax : {None, scalar}, optional
6915-
Arguments passed to the `Normalize` instance.
6913+
vmin/vmax : None or scalar, optional
6914+
Arguments passed to the `~.colors.Normalize` instance.
69166915
69176916
alpha : ``0 <= scalar <= 1`` or ``None``, optional
69186917
The alpha blending value.
69196918
69206919
See also
69216920
--------
6922-
hist : 1D histogram
6921+
hist : 1D histogram plotting
69236922
69246923
Notes
69256924
-----
6926-
Rendering the histogram with a logarithmic color scale is
6927-
accomplished by passing a :class:`colors.LogNorm` instance to
6928-
the *norm* keyword argument. Likewise, power-law normalization
6929-
(similar in effect to gamma correction) can be accomplished with
6930-
:class:`colors.PowerNorm`.
6925+
- Currently ``hist2d`` calculates it's own axis limits, and any limits
6926+
previously set are ignored.
6927+
- Rendering the histogram with a logarithmic color scale is
6928+
accomplished by passing a `.colors.LogNorm` instance to the *norm*
6929+
keyword argument. Likewise, power-law normalization (similar
6930+
in effect to gamma correction) can be accomplished with
6931+
`.colors.PowerNorm`.
69316932
"""
69326933

69336934
h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range,

0 commit comments

Comments
 (0)