python - How to plot a bar plot in realtime using matplotlib -
i've continuous stream of data bins of histogram. can plot in real-time if use following:
import pylab plt matplotlib.pyplot import figure, show import numpy np plt.ion() x = np.linspace(0,4095,16) y = np.linspace(0,10000,16) f, axarr = plt.subplots(4, sharex=true) graph_low, = axarr[0].plot(x,y,label='somelabel') graph_low.set_ydata(z)
but plots line-plot.
the issue can't find similar set_ydata bar plot.
does job you?
ax = plt.bar(left, height) ax.patches[i].set_height(x)
where i
index particular bar , x
desired height.
Comments
Post a Comment