Plot Cumulative Distribution Function from shape, scale, and location parameters
Question: After applying Generalised Extreme Value (GEV) theory I have a shape,
location, and scale parameter to describe my distribution. Now I'm trying to
plot a CDF with these three parameters in Python. In matlab there's a ["cdf"
function](http://www.mathworks.com/help/stats/cdf.html) that does this. I
cannot find a way to do it with scipy?


Answer: Use the `cdf` method of
[`scipy.stats.genextreme`](http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.genextreme.html).

For example, the following ipython session...

    
    
    In [40]: from scipy.stats import genextreme
    
    In [41]: shape = -0.5
    
    In [42]: loc = 0.0
    
    In [43]: scale = 2.5
    
    In [44]: x = np.linspace(scale/shape, 20, 200)
    
    In [45]: y = genextreme.cdf(x, shape, loc, scale)
    
    In [46]: import matplotlib.pyplot as plt
    
    In [47]: plt.plot(x, y, label="GEV CDF")
    Out[47]: [<matplotlib.lines.Line2D at 0x10e135790>]
    
    In [48]: plt.legend(loc='best')
    Out[48]: <matplotlib.legend.Legend at 0x10de4cc50>
    

generates this plot:

[![plot](http://i.stack.imgur.com/os0Ki.png)](http://i.stack.imgur.com/os0Ki.png)

Note that the shape parameter `c` in the scipy code has the opposite sign of
the shape parameter ξ used in the [wikipedia article on the generalized
extreme value
distribution](https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution).

