2

I've a continuous stream of data which is basically bins of a histogram. I can plot a in real-time if use something like following:

import pylab as plt 
from matplotlib.pyplot import figure, show
import numpy as 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 this only plots a line-plot.

The issue is I can't find something similar to set_ydata for a bar plot.

1 Answer 1

2

Does this do the job for you?

ax = plt.bar(left, height)
ax.patches[i].set_height(x)

where i is the index for a particular bar and x is the desired height.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.