p1.shading_filter?
and it will give you the documentation for it
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.