Plots not updating with Select widget

Hi,

My plot cannot update with Select widget. Any suggestions?

Thanks

Hi,

It is impossible to say anything about a question this vague. It is always necessary to share more details (code) if you want people to try and help.

Thanks,

Bryan

···

On Feb 4, 2017, at 22:49, [email protected] wrote:

Hi,

My plot cannot update with Select widget. Any suggestions?

Thanks

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/50c34b67-0481-4c68-b087-de9ea0045193%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Bryan,

Sorry about that. The code would be something like this:

from bokeh.io import curdoc, output_file

from bokeh.layouts import column

from bokeh.models import ColumnDataSource, RadioButtonGroup, Select

from bokeh.plotting import figure

from bokeh.sampledata.iris import flowers

species = [‘setosa’, ‘versicolor’, ‘virginica’]

menu = Select(options=[‘setosa’,‘versicolor’,‘virginica’],value=‘setosa’, title=‘Species’, width = 100)

menu.on_change(‘value’,lambda attr, old, new: update_plot())

def update_plot():

current = flowers[flowers.species == menu.value]

return dict(

		width = current.sepal_width,

		length = current.sepal_length,

	)

flowers_cds = ColumnDataSource(data=dict(width=,length=))

flowers_cds.data = update_plot()

plot = figure()

plot.circle(x=‘width’, y=‘length’, source=flowers_cds)

curdoc().add_root(column(menu, plot))

Thanks!

···

Bryan

On Feb 4, 2017, at 22:49, [email protected] wrote:

Hi,

My plot cannot update with Select widget. Any suggestions?

Thanks

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/50c34b67-0481-4c68-b087-de9ea0045193%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.