def disp(c, domain=True):
    """
    Create a string formatted list of the curve's x-values if domain is True, otherwise y-values.

    >>> c = pydvif.span(1, 10)

    >>> yvalues = pydvif.disp(c, False)

    :param c: The given curve
    :type curvelist: Curve
    :param domain: if True, display the x-values of the curve. Otherwise, display the y-values of the curve
    :type domain: bool, optional
    :return: list -- The list of x- or y-values as strings
    """
    ss = list()

    for i in range(len(c.x)):
        if domain:
            ss.append('x[%d]: %.4f' % (i, c.x[i]))
        else:
            ss.append('y[%d]: %.4f' % (i, c.y[i]))

    return ss