Skip to content

Commit

Permalink
DOC: Further tweaks to histogram2d docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Nov 26, 2012
1 parent 0244720 commit 840cbbe
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions numpy/lib/twodim_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,19 @@ def histogram2d(x, y, bins=10, range=None, normed=False, weights=None):
Parameters
----------
x : array_like, shape(N,)
A sequence of values to be histogrammed along the first dimension.
y : array_like, shape(M,)
A sequence of values to be histogrammed along the second dimension.
x : array_like, shape (N,)
An array containing the x coordinates of the points to be histogrammed.
y : array_like, shape (N,)
An array containing the y coordinates of the points to be histogrammed.
bins : int or [int, int] or array_like or [array, array], optional
The bin specification:
* If int, the number of bins for the two dimensions (nx=ny=bins).
* 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 (x_edges, y_edges = 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
(x_edges, y_edges = bins).
range : array_like, shape(2,2), optional
The leftmost and rightmost edges of the bins along each dimension
Expand Down Expand Up @@ -560,8 +562,8 @@ def histogram2d(x, y, bins=10, range=None, normed=False, weights=None):
See Also
--------
histogram: 1D histogram
histogramdd: Multidimensional histogram
histogram : 1D histogram
histogramdd : Multidimensional histogram
Notes
-----
Expand All @@ -572,7 +574,7 @@ def histogram2d(x, y, bins=10, range=None, normed=False, weights=None):
\\sum_{i=0}^{nx-1} \\sum_{j=0}^{ny-1} H_{i,j} \\Delta x_i \\Delta y_j = 1
where `H` is the histogram array and :math:`\\Delta x_i \\Delta y_i`
the area of bin `{i,j}`.
the area of bin ``{i,j}``.
Please note that the histogram does not follow the Cartesian convention
where `x` values are on the abcissa and `y` values on the ordinate axis.
Expand Down

0 comments on commit 840cbbe

Please sign in to comment.