def get_x_data(data, convertToTime):
    """
    Gets the x-axis data to plot from the data passed in. The data is of the
    form (yvalues, time). The convertToTime parameter indicates whether to
    return just the range of the values passed in, or whether to convert this
    to a (zero-based) time
    """
    numSamples= len(data[0])
    if (not convertToTime):
        return range(numSamples)

    spacing = float(data[1]) / numSamples
    return [i*spacing for i in range(numSamples)]