'Add a horizontal span (rectangle) across the axis.
Draw a horizontal span (rectangle) from *ymin* to *ymax*.
With the default values of *xmin* = 0 and *xmax* = 1, this
always spans the xrange, regardless of the xlim settings, even
if you change them, e.g., with the :meth:`set_xlim` command.
That is, the horizontal extent is in axes coords: 0=left,
0.5=middle, 1.0=right but the *y* location is in data
coordinates.
Parameters
ymin : float
Lower limit of the horizontal span in data units.
ymax : float
Upper limit of the horizontal span in data units.
xmin : float, optional, default: 0
Lower limit of the vertical span in axes (relative
0-1) units.
xmax : float, optional, default: 1
Upper limit of the vertical span in axes (relative
0-1) units.
Returns
Polygon : `~matplotlib.patches.Polygon`
Other Parameters
**kwargs : `~matplotlib.patches.Polygon` properties.
%(Polygon)s
See Also
axvspan : add a vertical span across the axes'

@docstring.dedent_interpd
def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):

    trans = self.get_yaxis_transform(which=u'grid')
    self._process_unit_info([xmin, xmax], [ymin, ymax], kwargs=kwargs)
    (xmin, xmax) = self.convert_xunits([xmin, xmax])
    (ymin, ymax) = self.convert_yunits([ymin, ymax])
    verts = ((xmin, ymin), (xmin, ymax), (xmax, ymax), (xmax, ymin))
    p = mpatches.Polygon(verts, **kwargs)
    p.set_transform(trans)
    self.add_patch(p)
    self.autoscale_view(scalex=False)
    return p
