def minmax(data, fields):
    """
    Get the minimum and maximum data values out of all fields given.
    Returns them in a dictionary with the 'vmin' and 'vmax' keys.
    """
    vmin = min(data[field].values.min() for field in fields)
    vmax = max(data[field].values.max() for field in fields)
    return dict(vmin=vmin, vmax=vmax)