def shrinky(ax,pad):
    """
    shrinky: shrinks axes by pad by moving the top border down

    Parameters
    ----------
    ax : matplotlib axes
        axes whose position is shifted
    pad : float
        shrink amount

    Returns
    -------
    ax : matplotlib axes
        shrunk axes

    """
    
    pos = ax.get_position()
    pos.y1 = pos.y1-pad
    ax.set_position(pos)    
    
    return ax