I am working on computational thread art using python. And I would like to have a possibility to draw lines on image array and visualise the process in real-time. I have found a possibility to do it for a scalar array using bokeh via ColumnDataSource.patch. Streaming does not seem to cut it, because I need to replace the data, not update it.
Is there any way to use anything similar to patch in holoviews? The ideal would be to have it possible for hw.RGB.
A working example would be much appreciated.
A good example of what I am trying to achieve can be seen in this website: Генератор string art изображений | Programforyou
The algorithm is working on a numpy array, thus the plot needs to reflect the state of it. So essentially, I need to initialise the RGB(A) image and then update it from python by providing coordinates and corresponding values.
Although it’s good to know that very custom JS apps can be achieved, I am looking for slightly higher level solution, something analogous to ColumnDataSource.patch, just in holoviews.
There are many nuances with bokeh that aren’t ideal for my case, such as awkward RGB conversions and y-coord flipping, while holoviews does it all just the way that I need.
Thank you! Very good to know that this tool exists, could be useful in the future!
However I need this tool the other way round, so that I programatically draw in python and it is synced with JS efficiently, by doing partial updates rather than full re-draw.