Quantile-Quantile Plot using SciPy

后端 未结 9 2017
长情又很酷
长情又很酷 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 06:57

    Using qqplot of statsmodels.api is another option:

    Very basic example:

    import numpy as np
    import statsmodels.api as sm
    import pylab
    
    test = np.random.normal(0,1, 1000)
    
    sm.qqplot(test, line='45')
    pylab.show()
    

    Result:

    enter image description here

    Documentation and more example are here

提交回复
热议问题