def convertforboxplotsilos(x, y, xbins):
    """
    x,y are lists of floats
    xbins is a list of elements of the form (start,stop,label)
    converts the data into a bin list (the x in boxplot) which is a list of the labels
    and partitions the y data based on where the x datapoint exists in the bins. 
    bins are created to be [start,stop)
    """
    labels = []
    for silo in xbins:
        labels.append(silo[2])
    if len(x) != len(y):
        raise Exception()
    ys = []
    for silo in xbins:
        ys.append([])
    for i in range(0, len(x)):
        xpt = x[i]
        ypt = y[i]
        for j in range(0, len(xbins)):
            if xbins[j][0] <= xpt and xpt < xbins[j][1]:
                ys[j].append(ypt)
    return labels, ys
