plfit/plfit_v1.py
def plotcdf(x,xmin,alpha):
    """
    Plots CDF and powerlaw
    """

    x=sort(x)
    n=len(x)
    xcdf = arange(n,0,-1,dtype='float')/float(n)

    q = x[x>=xmin]
    fcdf = (q/xmin)**(1-alpha)
    nc = xcdf[argmax(x>=xmin)]
    fcdf_norm = nc*fcdf

    loglog(x,xcdf)
    loglog(q,fcdf_norm)
def plotcdf(x,xmin,alpha):
    """
    Plots CDF and powerlaw
    """

    x=sort(x)
    n=len(x)
    xcdf = arange(n,0,-1,dtype='float')/float(n)

    q = x[x>=xmin]
    fcdf = (q/xmin)**(1-alpha)
    nc = xcdf[argmax(x>=xmin)]
    fcdf_norm = nc*fcdf

    loglog(x,xcdf)
    loglog(q,fcdf_norm)
def plotcdf ( x , xmin , alpha ) : x = sort ( x ) n = len ( x ) xcdf = arange ( n , 0 , - 1 , dtype = 'float' ) / float ( n ) q = x [ x >= xmin ] fcdf = ( q / xmin ) ** ( 1 - alpha ) nc = xcdf [ argmax ( x >= xmin ) ] fcdf_norm = nc * fcdf loglog ( x , xcdf ) loglog ( q , fcdf_norm )
Plots CDF and powerlaw
Plots CDF and powerlaw