def savefig(fig, *args, **kwargs):
    """
    Save figure with tight bounding box.
    From https://github.com/mwaskom/seaborn/blob/master/seaborn/axisgrid.py#L33
    """
    kwargs = kwargs.copy()
    kwargs.setdefault('bbox_inches', 'tight')
    fig.savefig(*args, **kwargs)
