def plot_map(m, x, y, data, clevs, cmap, norm, mesh, filled, **map_kwargs):
    """
    Producing a map plot

    Parameters
    ----------
        m: Basemap object
            Handle for the map object returned from 'map_setup' function
        data: numpy array
            2D data array to plot
        x,y: numpy arrays
            Arrays of map coordinates; returned from 'map_setup' function
        clevs: List/array
            Contour levels
        cmap: string
            Color map. See http://matplotlib.org/users/colormaps.html for more
            information.
        norm: Boundary norm object
            Normalize data to [0,1] to use for mapping colors
        mesh: boolean
            Whether to plot data as mesh. If false (default), contour plot is
            made.
        filled: Boolean
            Whether to color fill between contours or not. Defaults to True
        **map_kwargs: keyword arguments
            arguments (key=value) that can be used in pyplot.contour(f)
            See
            http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.contour

    Returns
    -------
        cs: Contour plot object
    """

    if mesh:
        cs = m.pcolormesh(x, y, data,
                          cmap=cmap,
                          norm=norm,
                          **map_kwargs)
    else:
        if filled:
            cs = m.contourf(x, y, data,
                            levels=clevs,
                            norm=norm,
                            cmap=cmap,
                            **map_kwargs)
        else:
            if cmap is not None:
                map_kwargs['colors'] = None
                cs = m.contour(x, y, data,
                               levels=clevs,
                               norm=norm,
                               cmap=cmap,
                               **map_kwargs)
            else:
                cs = m.contour(x, y, data,
                               norm=norm,
                               levels=clevs,
                               **map_kwargs)

    try:
        m.drawcountries(linewidth=.7, color="#424242")
    except ValueError:
        pass
    try:
        m.drawcoastlines(linewidth=1.0, color='#383838')
    except ValueError:
        pass

    return cs