Correction selection histogram example
@@ -81,7 +81,7 @@ curdoc().add_root(layout)
curdoc().title = "Selection Histogram"
def update(attr, old, new):
- inds = np.array(new['1d']['indices'])
+ inds = new
if len(inds) == 0 or len(inds) == len(x):
hhist1, hhist2 = hzeros, hzeros
vhist1, vhist2 = vzeros, vzeros
@@ -98,4 +98,4 @@ def update(attr, old, new):
vh1.data_source.data["right"] = vhist1
vh2.data_source.data["right"] = -vhist2
-r.data_source.on_change('selected', update)
+r.data_source.selected.on_change('indices', update)
