Hi all
Would it be possible to hide/show this line plot by pressing the button named “first”?
My initial idea was to create a CollumnDataFrame with a 0 and 1, and then use these values as the input for the line alpha.
But is this possible and how would it be done? Is it possible for a single line glyph to have two different Source?
I know this is a “hackish” way of doing it, but I haven’t found any alternative ways?
The code below is a modification of the “simple_hdf5” example I’ve made. But right now I cannot seem to get past the fact of having two sources for p.line(…
data_select = Select(title=“Output:”, value=“hip_strength”, options=[“hip_strength”, “knee_strength”])
checkbox_button_group = CheckboxButtonGroup(labels=[“first”, “second”], active=[0, 1])source = ColumnDataSource(data=dict(x=, y=))
checkbox_source = ColumnDataSource(data=dict(first=, second=))p = Figure(plot_height=600, plot_width=800, title=“”, toolbar_location=None)
p.line(x=“x”, y=“y”, alpha=“first”, source=source)
This is the result right now. Nothing happens when I press first, but I would like the line to disappear.
The entire code is here: https://github.com/KasperPRasmussen/bokeh/tree/master/examples/app/ShowAndHideLine

