'Add a horizontal line across the axis.
Parameters
y : scalar, optional, default: 0
y position in data coordinates of the horizontal line.
xmin : scalar, optional, default: 0
Should be between 0 and 1, 0 being the far left of the plot, 1 the
far right of the plot.
xmax : scalar, optional, default: 1
Should be between 0 and 1, 0 being the far left of the plot, 1 the
far right of the plot.
Returns
:class:`~matplotlib.lines.Line2D`
Other Parameters
**kwargs :
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
with the exception of \'transform\':
%(Line2D)s
Notes
kwargs are passed to :class:`~matplotlib.lines.Line2D` and can be used
to control the line properties.
Examples
* draw a thick red hline at \'y\' = 0 that spans the xrange::
>>> axhline(linewidth=4, color=\'r\')
* draw a default hline at \'y\' = 1 that spans the xrange::
>>> axhline(y=1)
* draw a default hline at \'y\' = .5 that spans the middle half of
the xrange::
>>> axhline(y=.5, xmin=0.25, xmax=0.75)
See also
hlines : add horizontal lines in data coordinates
axhspan : add a horizontal span (rectangle) across the axis'

@docstring.dedent_interpd
def axhline(self, y=0, xmin=0, xmax=1, **kwargs):

    if (u'transform' in kwargs):
        raise ValueError((u"'transform'    is    not    allowed    as    a    kwarg;" + u'axhline    generates    its    own    transform.'))
    (ymin, ymax) = self.get_ybound()
    self._process_unit_info(ydata=y, kwargs=kwargs)
    yy = self.convert_yunits(y)
    scaley = ((yy < ymin) or (yy > ymax))
    trans = self.get_yaxis_transform(which=u'grid')
    l = mlines.Line2D([xmin, xmax], [y, y], transform=trans, **kwargs)
    self.add_line(l)
    self.autoscale_view(scalex=False, scaley=scaley)
    return l
