def get_mpl_extent(xds):
    """ Return an extent tuple in the format required by matplotlib. 

    :param xds: a MAR XDataset opened through MAR.open().
    :type xds: xr.Dataset
    :returns: (xmin,xmax,ymin,ymax)
    :rtype: tuple
    """
    bounds = xds.rio.bounds()
    extent = (bounds[0], bounds[2], bounds[1], bounds[3])
    return extent