correlation_plot#
- normtest.looney_gulledge.correlation_plot(axes, x_data, weighted=False)[source]#
This function creates an axis with the Looney-Gulledge test [1] correlation graph.
- Parameters:
- axesmatplotlib.axes.SubplotBase
The axis of the graph;
- x_datanumpy array
One dimension numpy array with at least
4observations.- weightedbool, optional
Whether to estimate the Normal order considering the repeats as its average (True) or not (False, default). Only has an effect if the dataset contains repeated values;
- Returns:
- axesmatplotlib.axes.SubplotBase
The axis of the graph;
References
[1]LOONEY, S. W.; GULLEDGE, T. R. Use of the Correlation Coefficient with Normal Probability Plots. The American Statistician, v. 39, n. 1, p. 75-79, fev. 1985.
Examples
>>> from normtest import looney_gulledge >>> import matplotlib.pyplot as plt >>> from scipy import stats >>> data = stats.norm.rvs(loc=0, scale=1, size=30, random_state=42) >>> fig, ax = plt.subplots(figsize=(6, 4)) >>> looney_gulledge.correlation_plot(axes=ax, x_data=data) >>> # plt.savefig("correlation_plot.png") >>> plt.show()