Hi
I have taken the selection_histogram.py code and changed is a little to display not a histogram but a multi-line plot on the right panel.
the simple code is attached and can be run in the usual way
at first all lines are colored red (as expected). then reset (not clear why) and all lines will turn into gray. Then use a selection tool to select some points in the scatter plot. Once these are selected the corresponding line plot(s) will be shown up as red.
At the same time Warnings are popping up, indicating that some arrays which should have same length are having different lengths.
Questions: is this the expected behavious, if not is there an error in my simple code. Do i miss an important reset.
If you donot reset the plot at the beginning it will not work at all: Not clear to me why this reset is needed.
also where can i find a little more background info. Could not find easy an entry in the user guide for this type of plots
The columns of a ColumnDataSource should be the same length at *all points in time*. But in your code, you are updating one column, then another. After you update the first column, the two columns have different lengths, and this triggers the warning. You need to update everything in .data "all at once". Here is one way:
Hi
I have taken the selection_histogram.py code and changed is a little to display not a histogram but a multi-line plot on the right panel.
the simple code is attached and can be run in the usual way
at first all lines are colored red (as expected). then reset (not clear why) and all lines will turn into gray. Then use a selection tool to select some points in the scatter plot. Once these are selected the corresponding line plot(s) will be shown up as red.
At the same time Warnings are popping up, indicating that some arrays which should have same length are having different lengths.
Questions: is this the expected behavious, if not is there an error in my simple code. Do i miss an important reset.
If you donot reset the plot at the beginning it will not work at all: Not clear to me why this reset is needed.
also where can i find a little more background info. Could not find easy an entry in the user guide for this type of plots