The .patch API sounds interesting but I’m afraid that its indexing principle is not compatible with images. The documentation says:
This method should be passed a dictionary that maps column names to lists of tuples, each of the form (index, new_value). The value at the given index for that column will be updated with the new value.
As far as, we have an image at each index of the column, I don’t see how I can reach a specific row in the image using a scalar index.
Anyway, I will have a look to the spectrogram example but it looks quite advanced (seems to make use of a some specific JS code).
Le lundi 13 février 2017 23:40:18 UTC+1, Bryan Van de ven a écrit :
The streaming API lets you stream data to the end of a column. In the case of images, the columns contain 2d arrays as elements, so the stream API would only let you stream a new image, to the end of a column of images. If you want to stream “inside” one to of the existing images, you will need to do something more sophisticated. It’s possible (though I have not tried) that the .patch API might be useful for “reaching in” to a single image. Alternatively, the spectrogram streams single columns into a larger image with the use of a custom extension:
On Feb 13, 2017, at 15:59, nicolas.fr [email protected] wrote:
I’d like to use ‘ColumnDataSource.stream’ for an image which size grows row-by-row.
I gave it a try (using a numpy array) but the appended data does seem to be properly interpreted.
Is ‘ColumnDataSource.stream’ supposed to work for image?
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/54f9aad7-1fc9-4640-9f27-e4b28c9a33ab%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.