Draw arrows at the end(s) of the lines

        Parameters
        ----------
        data : dict
            plot information as required by geom.draw
        scales : dict
            x scale, y scale
        ax : axes
            On which to draw
        constant: bool
            If the path attributes vary along the way. If false,
            the arrows are per segment of the path

def draw(self, data, panel_params, coord, ax, zorder, constant=True):
        """
        Draw arrows at the end(s) of the lines

        Parameters
        ----------
        data : dict
            plot information as required by geom.draw
        scales : dict
            x scale, y scale
        ax : axes
            On which to draw
        constant: bool
            If the path attributes vary along the way. If false,
            the arrows are per segment of the path
        """
        first = self.ends in ('first', 'both')
        last = self.ends in ('last', 'both')

        data = data.sort_values('group', kind='mergesort')
        data['color'] = to_rgba(data['color'], data['alpha'])

        if self.type == 'open':
            data['facecolor'] = 'none'
        else:
            data['facecolor'] = data['color']

        if not constant:
            # Get segments/points (x1, y1) -> (x2, y2)
            # for which to calculate the arrow heads
            idx1, idx2 = [], []
            for _, df in data.groupby('group'):
                idx1.extend(df.index[:-1])
                idx2.extend(df.index[1:])

            d = dict(
                zorder=zorder,
                edgecolor=data.loc[idx1, 'color'],
                facecolor=data.loc[idx1, 'facecolor'],
                linewidth=data.loc[idx1, 'size'],
                linestyle=data.loc[idx1, 'linetype'])

            x1 = data.loc[idx1, 'x'].values
            y1 = data.loc[idx1, 'y'].values
            x2 = data.loc[idx2, 'x'].values
            y2 = data.loc[idx2, 'y'].values

            if first:
                paths = self.get_paths(x1, y1, x2, y2,
                                       panel_params, coord, ax)
                coll = mcoll.PathCollection(paths, **d)
                ax.add_collection(coll)
            if last:
                x1, y1, x2, y2 = x2, y2, x1, y1
                paths = self.get_paths(x1, y1, x2, y2,
                                       panel_params, coord, ax)
                coll = mcoll.PathCollection(paths, **d)
                ax.add_collection(coll)
        else:
            d = dict(
                zorder=zorder,
                edgecolor=data['color'].iloc[0],
                facecolor=data['facecolor'].iloc[0],
                linewidth=data['size'].iloc[0],
                linestyle=data['linetype'].iloc[0],
                joinstyle='round',
                capstyle='butt')

            if first:
                x1, x2 = data['x'].iloc[0:2]
                y1, y2 = data['y'].iloc[0:2]
                x1, y1, x2, y2 = [np.array([i])
                                  for i in (x1, y1, x2, y2)]
                paths = self.get_paths(x1, y1, x2, y2,
                                       panel_params, coord, ax)
                patch = mpatches.PathPatch(paths[0], **d)
                ax.add_artist(patch)

            if last:
                x1, x2 = data['x'].iloc[-2:]
                y1, y2 = data['y'].iloc[-2:]
                x1, y1, x2, y2 = x2, y2, x1, y1
                x1, y1, x2, y2 = [np.array([i])
                                  for i in (x1, y1, x2, y2)]
                paths = self.get_paths(x1, y1, x2, y2,
                                       panel_params, coord, ax)
                patch = mpatches.PathPatch(paths[0], **d)
                ax.add_artist(patch)