@classmethod
def compute_group(cls, data, scales, **params):
sample = data["sample"].sort_values()
alpha, beta = params["alpha_beta"]
quantiles = params["quantiles"]
if quantiles is None:
quantiles = plotting_positions(sample, alpha, beta)
elif len(quantiles) != len(sample):
raise PlotnineError(
"The number of quantile values is not the same as "
"the number of sample values.")
quantiles = np.asarray(quantiles)
cdist = get_continuous_distribution(params["distribution"])
theoretical = cdist.ppf(quantiles, *params["dparams"])
return pd.DataFrame({"sample": sample,
"theoretical": theoretical})