Quantile-Quantile Plot using SciPy

后端 未结 9 2011
长情又很酷
长情又很酷 2020-12-04 06:44

How would you create a qq-plot using Python?

Assuming that you have a large set of measurements and are using some plotting function that takes XY-values as input. T

9条回答
  •  无人及你
    2020-12-04 07:14

    import numpy as np 
    import pylab 
    import scipy.stats as stats
    measurements = np.random.normal(loc = 20, scale = 5, size=100)   
    stats.probplot(measurements, dist="norm", plot=pylab)
    pylab.show()
    

    Here probplot draw the graph measurements vs normal distribution which speofied in dist="norm"

提交回复
热议问题