try:
        # Get the images on an axis
        cb = ax.images[-1].colorbar
        if cb:
            cb.remove()