Z[index:index+chunk_size] = chunk, index += chunk_size
But you have to take care of the case where index is close to the end of Z. in such case, you need to split your data in two parts and make 2 uploads.
np.roll
. You could also do this kind of thing on a numpy array that's 2 times the size of the buffer you need and treat it like a circular buffer. You update the array in two places with your new chunk, but the data you upload to matplotlib/vispy is the slice of the large array that represents the current N data points.
hey guys - i have gotten the original vispy example up and running. What direction should I go to add cursors? I figured the first two things I need to do is add this example to a WxPython frame which seems possible and start getting cursors up and running. The cursors are to mimic an oscilloscope trigger (horizontal bar) and location (vertical yellow bar). If you aren't familiar with an O'scope, these will basically cause the signal content that breaks above the horzontal yellow bar to be centered at the vertical bar. So I need a way for the user to drag these bars around on the screen to affect the data displayed and the x-axis location. I see how the 'y data' vector is working, but how do you add a line/cursor to the plot? It looks like I would need to plot two separate vectors? One being the data vector and one being the cursor line vector? Maybe listing would be better
basically my next step is to try to get this looking like a plot. I've added a picture too.