def _world2fig(ff, x, y):
    """
    Helper function to convert world to figure coordinates.

    Parameters
    ----------
    ff : `~aplpy.FITSFigure`
        `~aplpy.FITSFigure` instance.
    x : ndarray
        Array of x coordinates.
    y : ndarray
        Array of y coordinates.

    Returns
    -------
    coordsf : tuple
        Figure coordinates as tuple (xfig, yfig) of arrays.
    """
    # Convert world to pixel coordinates
    xp, yp = ff.world2pixel(x, y)

    # Pixel to Axes coordinates
    coordsa = ff._ax1.transData.transform(zip(xp, yp))

    # Axes to figure coordinates
    coordsf = ff._figure.transFigure.inverted().transform(coordsa)
    return coordsf[:, 0], coordsf[:, 1]