'Create patches from extended ends and add them to the axes.'

def _add_ends(self):

    del self.extension_patch1
    del self.extension_patch2
    (path1, path2) = self.ax.get_axes_locator().get_path_ends()
    fc = mpl.rcParams[u'axes.facecolor']
    ec = mpl.rcParams[u'axes.edgecolor']
    linewidths = (0.5 * mpl.rcParams[u'axes.linewidth'])
    self.extension_patch1 = PathPatch(path1, fc=fc, ec=ec, lw=linewidths, zorder=2.0, transform=self.ax.transAxes, clip_on=False)
    self.extension_patch2 = PathPatch(path2, fc=fc, ec=ec, lw=linewidths, zorder=2.0, transform=self.ax.transAxes, clip_on=False)
    self.ax.add_artist(self.extension_patch1)
    self.ax.add_artist(self.extension_patch2)
