Open wsphillips opened 5 years ago
Exposing unit scaling would be pretty easy in that we could provide a scaling factor to multiply the x-axis by - that would just be a simple change in the recipe.
Before I go hunting too much farther in vain: Are methods like scissoring or blitting used when rendering 2D line plots (specifically)? Or textures?
Are methods like scissoring
Yup, using scissor tests + stencil tests right now, but I'm not actually clipping outside the plotrange... But that's planned pretty soon, and subscenes already clip anything outside their pixelarea(scene)
Or textures?
What do you mean? Textures are used, yes...
Sorry, I should preface with: I'm learning as I go with OpenGL.
I have been looking for different techniques to efficiently plot lines fast and so far I have come across blitting the previously plotted points + line grid + time axis. Or alternatively (and again apologies if partial naivete) you can draw the points and use it as a texture surface that you only update a portion of using glTexSubImage2D
. If some solution already exists then there's little point chasing such dead ends.
Aside: I work with live neural data that's high frequency (think kHz) sampled, and the events we monitor are short and happen quickly. Monitoring this type of data was part of what motivated the similar package VisPy--it turns out OpenGL is pretty good at handling plots with massive data streaming in. Since my take is that it might be an edge case need, and I'm impressed with what's come out of this project so far, I don't mind doing a bit of work here (if I'm able) :)
Related to discussion here
I may be slow to offer solutions but timeseries could use a couple things to make it more useful and generalizable:
1) ability to accept vectors of new data points instead of just single numbers 2) expose
history
for controlling length of time plotted 3) expose unit scaling for x axis so that number ranges appropriately reflect true sampling ratesAny pointers of where to focus in the api would be helpful.