Skip to content

Commit a0533ba

Browse files
authored
Merge pull request numpy#18959 from marysia/histogram2d-documentation
DOC: improve numpy.histogram2d() documentation
2 parents d3b03c8 + 8fa5438 commit a0533ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

numpy/lib/twodim_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,9 @@ def histogram2d(x, y, bins=10, range=None, normed=None, weights=None,
705705
>>> x = np.random.normal(2, 1, 100)
706706
>>> y = np.random.normal(1, 1, 100)
707707
>>> H, xedges, yedges = np.histogram2d(x, y, bins=(xedges, yedges))
708-
>>> H = H.T # Let each row list bins with common y range.
708+
>>> # Histogram does not follow Cartesian convention (see Notes),
709+
>>> # therefore transpose H for visualization purposes.
710+
>>> H = H.T
709711
710712
:func:`imshow <matplotlib.pyplot.imshow>` can only display square bins:
711713

0 commit comments

Comments
 (0)