'Add a new axes on the right (or left) side of the main axes.
Parameters
size : :mod:`~mpl_toolkits.axes_grid.axes_size` or float or string
A width of the axes. If float or string is given, *from_any*
function is used to create the size, with *ref_size* set to AxesX
instance of the current axes.
pad : :mod:`~mpl_toolkits.axes_grid.axes_size` or float or string
Pad between the axes. It takes same argument as *size*.
pack_start : bool
If False, the new axes is appended at the end
of the list, i.e., it became the right-most axes. If True, it is
inserted at the start of the list, and becomes the left-most axes.
kwargs
All extra keywords arguments are passed to the created axes.
If *axes_class* is given, the new axes will be created as an
instance of the given class. Otherwise, the same class of the
main axes will be used.'

def new_horizontal(self, size, pad=None, pack_start=False, **kwargs):

    if pad:
        if (not isinstance(pad, Size._Base)):
            pad = Size.from_any(pad, fraction_ref=self._xref)
        if pack_start:
            self._horizontal.insert(0, pad)
            self._xrefindex += 1
        else:
            self._horizontal.append(pad)
    if (not isinstance(size, Size._Base)):
        size = Size.from_any(size, fraction_ref=self._xref)
    if pack_start:
        self._horizontal.insert(0, size)
        self._xrefindex += 1
        locator = self.new_locator(nx=0, ny=self._yrefindex)
    else:
        self._horizontal.append(size)
        locator = self.new_locator(nx=(len(self._horizontal) - 1), ny=self._yrefindex)
    ax = self._get_new_axes(**kwargs)
    ax.set_axes_locator(locator)
    return ax
