@@ -3656,37 +3656,39 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
3656
3656
"""
3657
3657
Plot horizontal lines.
3658
3658
3659
- call signature::
3660
-
3661
- hlines(y, xmin, xmax, colors='k', linestyles='solid', **kwargs)
3659
+ Plot horizontal lines at each `y` from `xmin` to `xmax`.
3662
3660
3663
- Plot horizontal lines at each *y* from *xmin* to *xmax*.
3661
+ Parameters
3662
+ ----------
3663
+ y : scalar or 1D array_like
3664
+ y-indexes where to plot the lines.
3664
3665
3665
- Returns the :class:`~matplotlib.collections.LineCollection`
3666
- that was added.
3666
+ xmin, xmax : scalar or 1D array_like
3667
+ Respective beginning and end of each line. If scalars are
3668
+ provided, all lines will have same length.
3667
3669
3668
- Required arguments:
3670
+ colors : array_like of colors, optional, default: 'k'
3669
3671
3670
- *y*:
3671
- a 1-D numpy array or iterable.
3672
+ linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional
3672
3673
3673
- *xmin* and *xmax*:
3674
- can be scalars or ``len(x)`` numpy arrays. If they are
3675
- scalars, then the respective values are constant, else the
3676
- widths of the lines are determined by *xmin* and *xmax*.
3674
+ label : string, optional, default: ''
3677
3675
3678
- Optional keyword arguments:
3676
+ Returns
3677
+ -------
3678
+ lines : `~matplotlib.collections.LineCollection`
3679
3679
3680
- *colors*:
3681
- a line collections color argument, either a single color
3682
- or a ``len(y)`` list of colors
3680
+ Other parameters
3681
+ ----------------
3682
+ kwargs : `~matplotlib.collections.LineCollection` properties.
3683
3683
3684
- *linestyles*:
3685
- [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
3684
+ See also
3685
+ --------
3686
+ vlines : vertical lines
3686
3687
3687
- **Example:**
3688
+ Examples
3689
+ --------
3690
+ .. plot:: mpl_examples/pylab_examples/vline_hline_demo.py
3688
3691
3689
- .. plot:: mpl_examples/pylab_examples/hline_demo.py
3690
3692
"""
3691
3693
3692
3694
# We do the conversion first since not all unitized data is uniform
@@ -3743,27 +3745,39 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
3743
3745
"""
3744
3746
Plot vertical lines.
3745
3747
3746
- Call signature::
3748
+ Plot vertical lines at each `x` from `ymin` to `ymax`.
3747
3749
3748
- vlines(x, ymin, ymax, color='k', linestyles='solid')
3750
+ Parameters
3751
+ ----------
3752
+ x : scalar or 1D array_like
3753
+ x-indexes where to plot the lines.
3749
3754
3750
- Plot vertical lines at each *x* from *ymin* to *ymax*. *ymin*
3751
- or *ymax* can be scalars or len(*x*) numpy arrays. If they are
3752
- scalars, then the respective values are constant, else the
3753
- heights of the lines are determined by *ymin* and *ymax*.
3755
+ xmin, xmax : scalar or 1D array_like
3756
+ Respective beginning and end of each line. If scalars are
3757
+ provided, all lines will have same length.
3754
3758
3755
- *colors* :
3756
- A line collection's color args, either a single color
3757
- or a ``len(x)`` list of colors
3759
+ colors : array_like of colors, optional, default: 'k'
3758
3760
3759
- * linestyles* : [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
3761
+ linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional
3760
3762
3761
- Returns the :class:`matplotlib.collections.LineCollection`
3762
- that was added.
3763
+ label : string, optional, default: ''
3763
3764
3764
- kwargs are :class:`~matplotlib.collections.LineCollection` properties:
3765
+ Returns
3766
+ -------
3767
+ lines : `~matplotlib.collections.LineCollection`
3768
+
3769
+ Other parameters
3770
+ ----------------
3771
+ kwargs : `~matplotlib.collections.LineCollection` properties.
3772
+
3773
+ See also
3774
+ --------
3775
+ hlines : horizontal lines
3776
+
3777
+ Examples
3778
+ ---------
3779
+ .. plot:: mpl_examples/pylab_examples/vline_hline_demo.py
3765
3780
3766
- %(LineCollection)s
3767
3781
"""
3768
3782
3769
3783
self ._process_unit_info (xdata = x , ydata = [ymin , ymax ], kwargs = kwargs )
@@ -8403,7 +8417,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
8403
8417
# For normed data, set to log base * minimum data value
8404
8418
# (gives 1 full tick-label unit for the lowest filled bin)
8405
8419
ndata = np .array (n )
8406
- minimum = (np .min (ndata [ndata > 0 ])) / logbase
8420
+ minimum = (np .min (ndata [ndata > 0 ])) / logbase
8407
8421
else :
8408
8422
# For non-normed data, set the min to log base,
8409
8423
# again so that there is 1 full tick-label unit
0 commit comments