, - :
http://matplotlib.org/examples/pylab_examples/step_demo.html
:
import numpy as np
import matplotlib.pyplot as pp
bin_edges = np.arange(100)
bin_values = np.exp(-np.arange(100)/5.0)
pp.figure(figsize=(7,7),edgecolor='k',facecolor='w')
pp.step(bin_edges,bin_values, where='post',color='k',lw=2)
pp.tight_layout(pad=0.25)
pp.show()
bin_edges , where = 'post'; , = 'pre'. , , , () , post (pre). / , .
2 - , - :
data = np.random.rand(1000)
nBins = 100
rng = [0,1]
n,bins = np.histogram(data,nBins,rng)
x = bins[:-1] + 0.5*np.diff(bins)
pp.figure(figsize=(7,7),edgecolor='k',facecolor='w')
pp.step(x,n,where='mid',color='k',lw=2)
pp.show()