Changing source of plot in bokeh with a callback
Imagine I have 2 (or more) sources of data with the same number of columns and rows: #Data dates = [date(2016, i, 1) for i in range(1,13)] data1 = pd.DataFrame(index = dates, data = random.randn(12, 2), columns = ['A', 'B']) data2 = pd.DataFrame(index = dates, data = random.randn(12, 2), columns = ['A', 'B']) and I want to plot columns A & B in bokeh as so: #Bokeh source = ColumnDataSource(source1) source1 = ColumnDataSource(data1) source2 = ColumnDataSource(data2) p = figure(x_axis_type = 'datetime') l1 = p.line(source = source, x = dates, y= 'A', color = 'Red') l2 = p.line(source = source, x