def hlines(self, y, xmin, xmax, colors='<STR_LIT:k>', linestyles='<STR_LIT>',<EOL>label='<STR_LIT>', **kwargs):
if kwargs.get('<STR_LIT>') is not None:<EOL><INDENT>raise DeprecationWarning('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>y = self.convert_yunits( y )<EOL>xmin = self.convert_xunits( xmin )<EOL>xmax = self.convert_xunits( xmax )<EOL>if not iterable(y): y = [y]<EOL>if not iterable(xmin): xmin = [xmin]<EOL>if not iterable(xmax): xmax = [xmax]<EOL>y = np.asarray(y)<EOL>xmin = np.asarray(xmin)<EOL>xmax = np.asarray(xmax)<EOL>if len(xmin)==<NUM_LIT:1>:<EOL><INDENT>xmin = np.resize( xmin, y.shape )<EOL><DEDENT>if len(xmax)==<NUM_LIT:1>:<EOL><INDENT>xmax = np.resize( xmax, y.shape )<EOL><DEDENT>if len(xmin)!=len(y):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if len(xmax)!=len(y):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>verts = [ ((thisxmin, thisy), (thisxmax, thisy))<EOL>for thisxmin, thisxmax, thisy in zip(xmin, xmax, y)]<EOL>coll = mcoll.LineCollection(verts, colors=colors,<EOL>linestyles=linestyles, label=label)<EOL>self.add_collection(coll)<EOL>coll.update(kwargs)<EOL>minx = min(xmin.min(), xmax.min())<EOL>maxx = max(xmin.max(), xmax.max())<EOL>miny = y.min()<EOL>maxy = y.max()<EOL>corners = (minx, miny), (maxx, maxy)<EOL>self.update_datalim(corners)<EOL>self.autoscale_view()<EOL>return coll<EOL>
call signature::

  hlines(y, xmin, xmax, colors='k', linestyles='solid', **kwargs)

Plot horizontal lines at each *y* from *xmin* to *xmax*.

Returns the :class:`~matplotlib.collections.LineCollection`
that was added.

Required arguments:

  *y*:
    a 1-D numpy array or iterable.

  *xmin* and *xmax*:
    can be scalars or ``len(x)`` numpy arrays.  If they are
    scalars, then the respective values are constant, else the
    widths of the lines are determined by *xmin* and *xmax*.

Optional keyword arguments:

  *colors*:
    a line collections color argument, either a single color
    or a ``len(y)`` list of colors

  *linestyles*:
    [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]

**Example:**

.. plot:: mpl_examples/pylab_examples/hline_demo.py