def ppcc_plot(x, a, b, dist='tukeylambda', plot=None, N=80):
 if (b <= a):
  raise ValueError('`b` has to be larger than `a`.')
 svals = np.linspace(a, b, num=N)
 ppcc = np.empty_like(svals)
 for (k, sval) in enumerate(svals):
  (_, r2) = probplot(x, sval, dist=dist, fit=True)
  ppcc[k] = r2[(-1)]
 if (plot is not None):
  plot.plot(svals, ppcc, 'x')
  _add_axis_labels_title(plot, xlabel='Shape Values', ylabel='Prob Plot Corr. Coef.', title=('(%s) PPCC Plot' % dist))
 return (svals, ppcc)

def ppcc_plot ( x , a , b , dist = 'tukeylambda' , plot = None , N = 80 ) : if ( b <= a ) : raise ValueError ( '`b` has to be larger than `a`.' ) svals = np . linspace ( a , b , num = N ) ppcc = np . empty_like ( svals ) for ( k , sval ) in enumerate ( svals ) : ( _ , r2 ) = probplot ( x , sval , dist = dist , fit = True ) ppcc [ k ] = r2 [ ( - 1 ) ] if ( plot is not None ) : plot . plot ( svals , ppcc , 'x' ) _add_axis_labels_title ( plot , xlabel = 'Shape Values' , ylabel = 'Prob Plot Corr. Coef.' , title = ( '(%s) PPCC Plot' % dist ) ) return ( svals , ppcc )
calculate and optionally plot probability plot correlation coefficient .