def _project_data(proj_axes, data):
    """
        Helper function to project data onto the the axes defined in proj_axes.

        :param proj_axes:   str that holds the axes that are projected to as number, e.g. '01' for projection onto xy
                            or '02' for projection onto xz.
        :param data:
    """
    p_a = proj_axes
    dim = len(proj_axes)
    if dim == 2:
        indices = '012'
        for ix in range(len(p_a)):
            indices = indices.replace(p_a[ix], '')
        deleted_axis = int(indices)
        ax = [0, 1, 2]
        ax.remove(deleted_axis)
        result = data[:, (ax)]
    elif dim == 1:
        ax = int(p_a)
        result = data[:, (ax)]
    else:
        result = data
    return result
