I tried to plot a distribution pdf and cdf in one plot. If plot together, pdf and cdf are not matched. If plot separately, they will match. Why? You can see both green curves from same equation, but shows different shape...
def MBdist(n,loct,scale):
data = maxwell.rvs(loc=loct, scale=scale, size=n)
params = maxwell.fit(data, floc=0)
return data, params
if __name__ == '__main__':
data,para=MBdist(10000,0,0.5)
plt.subplot(211)
plt.hist(data, bins=20, normed=True)
x = np.linspace(0, 5, 20)
print x
plt.plot(x, maxwell.pdf(x, *para),'r',maxwell.cdf(x, *para), 'g')
plt.subplot(212)
plt.plot(x, maxwell.cdf(x, *para), 'g')
plt.show()