diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py index c1f75c630b2f..ce147965c46f 100644 --- a/numpy/lib/twodim_base.py +++ b/numpy/lib/twodim_base.py @@ -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 @@ -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 ----- @@ -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.