[英]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.