[英]matplotlib plot on cumulative graph from x-axis instead of y-axis
如果我正确理解你的第二个情节,你需要做的就是摆脱orientation='horizontal'
and normed=True
这是一个例子
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import mlab
mu = 200
sigma = 25
n_bins = 50
x = mu + sigma*np.random.randn(10000)
n, bins, patches = plt.hist(x, n_bins,
histtype='step', cumulative=True)
plt.grid(True)
plt.title('cumulative step')
plt.show()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.