This is described in the pyqtgraph 'histogram' example. This is the translation:
import pyqtgraph as pg
import numpy as np
x = np.arange(0,1,0.1)
y = [0,0,0,2,2,8,9,2,0,0]
print len(x), len(y)
plt = pg.plot(x,y,pen='r')
curve2 = pg.PlotCurveItem(x,y[:-1],pen='b',stepMode=True)
plt.addItem(curve2)