def _get_colorbar_properties(old_artist):
    """
    Returns the parameters for recreating the colorbar.

    Parameters
    ----------
    old_artist : matplotlib.artist.Artist
        The artist whose colorbar to copy.

    Returns
    -------
    colorbar : dict
        Dictionary of parameters.
    """
    cb = getattr(old_artist, 'colorbar')
    if cb is not None:
        colorbar = {'show': True, 'orientation': cb.orientation}
        if hasattr(cb, '_label') and cb._label:
            colorbar['label'] = cb._label
        return colorbar
    else:
        return {}
