# Buggy code
def _draw_2d_from_points(draw_method_name, arg_func, cube, *args, **kwargs):
    # NB. In the interests of clarity we use "u" and "v" to refer to the
    # horizontal and vertical axes on the matplotlib plot.

    # get & remove the coords entry from kwargs
    coords = kwargs.pop("coords", None)
    mode = iris.coords.POINT_MODE
    if coords is not None:
        plot_defn = _get_plot_defn_custom_coords_picked(cube, coords, mode)
    else:
        plot_defn = _get_plot_defn(cube, mode, ndims=2)

    data = cube.data
    if plot_defn.transpose:
        data = data.T

    if _can_draw_map(plot_defn.coords):
        result = _map_common(
            draw_method_name,
            arg_func,
            iris.coords.POINT_MODE,
            cube,
            data,
            *args,
            **kwargs,
        )
    else:
        # Obtain U and V coordinates
        v_coord, u_coord = plot_defn.coords
        if u_coord:
            u = u_coord.points
            u = _fixup_dates(u_coord, u)
        else:
            u = np.arange(data.shape[1])
        if v_coord:
            v = v_coord.points
            v = _fixup_dates(v_coord, v)
        else:
            v = np.arange(data.shape[0])

        if plot_defn.transpose:
            u = u.T
            v = v.T

        if u.dtype == np.dtype(object) and isinstance(u[0], datetime.datetime):
            u = mpl_dates.date2num(u)

        if v.dtype == np.dtype(object) and isinstance(v[0], datetime.datetime):
            v = mpl_dates.date2num(v)

        u, v = _broadcast_2d(u, v)

        draw_method = getattr(plt, draw_method_name)
        if arg_func is not None:
            args, kwargs = arg_func(u, v, data, *args, **kwargs)
            result = draw_method(*args, **kwargs)
        else:
            result = draw_method(u, v, data, *args, **kwargs)

    return result


# Traceback (iris.exceptions.CoordinateNotFoundError)
Traceback (most recent call last):
File "/net/home/h05/cpelley/Remedy/GITHUB/no_pass_coords.py", line 28, in <module>
iplt.contourf(cube)
File "/home/h05/cpelley/git/iris/lib/iris/plot.py", line 464, in contourf
result = _draw_2d_from_points('contourf', None, cube, *args, **kwargs)
File "/home/h05/cpelley/git/iris/lib/iris/plot.py", line 261, in _draw_2d_from_points
*args, **kwargs)
File "/home/h05/cpelley/git/iris/lib/iris/plot.py", line 373, in _map_common
x, y = cartography.get_xy_grids(cube)
File "/home/h05/cpelley/git/iris/lib/iris/analysis/cartography.py", line 190, in get_xy_grids
x_coord, y_coord = cube.coord(axis="X"), cube.coord(axis="Y")
File "/home/h05/cpelley/git/iris/lib/iris/cube.py", line 1041, in coord
raise iris.exceptions.CoordinateNotFoundError(msg)
iris.exceptions.CoordinateNotFoundError: u'Expected to find exactly 1 coordinate, but found 2. They were: grid_longitude, longitude.'

# Fixed code
def _draw_2d_from_points(draw_method_name, arg_func, cube, *args, **kwargs):
    # NB. In the interests of clarity we use "u" and "v" to refer to the
    # horizontal and vertical axes on the matplotlib plot.
    mode = iris.coords.POINT_MODE
    # Get & remove the coords entry from kwargs.
    coords = kwargs.pop("coords", None)
    if coords is not None:
        plot_defn = _get_plot_defn_custom_coords_picked(cube, coords, mode)
    else:
        plot_defn = _get_plot_defn(cube, mode, ndims=2)

    if _can_draw_map(plot_defn.coords):
        result = _map_common(
            draw_method_name,
            arg_func,
            iris.coords.POINT_MODE,
            cube,
            plot_defn,
            *args,
            **kwargs,
        )
    else:
        # Obtain data array.
        data = cube.data
        if plot_defn.transpose:
            data = data.T

        # Obtain U and V coordinates
        v_coord, u_coord = plot_defn.coords
        if u_coord:
            u = u_coord.points
            u = _fixup_dates(u_coord, u)
        else:
            u = np.arange(data.shape[1])
        if v_coord:
            v = v_coord.points
            v = _fixup_dates(v_coord, v)
        else:
            v = np.arange(data.shape[0])

        if plot_defn.transpose:
            u = u.T
            v = v.T

        if u.dtype == np.dtype(object) and isinstance(u[0], datetime.datetime):
            u = mpl_dates.date2num(u)

        if v.dtype == np.dtype(object) and isinstance(v[0], datetime.datetime):
            v = mpl_dates.date2num(v)

        u, v = _broadcast_2d(u, v)

        draw_method = getattr(plt, draw_method_name)
        if arg_func is not None:
            args, kwargs = arg_func(u, v, data, *args, **kwargs)
            result = draw_method(*args, **kwargs)
        else:
            result = draw_method(u, v, data, *args, **kwargs)

    return result