Skip to content

Instantly share code, notes, and snippets.

@hhuuggoo
Last active August 29, 2015 14:04
Show Gist options
  • Save hhuuggoo/78a850973cff18b1b246 to your computer and use it in GitHub Desktop.
Save hhuuggoo/78a850973cff18b1b246 to your computer and use it in GitHub Desktop.
class Demo(HBox):
extra_generated_classes = [["Demo", "Demo", "VBox"]]
plot = Instance(Plot)
AR_select = Instance(Select)
@classmethod
def create(cls):
obj = cls()
obj.plot = make_plot(you define this function)
obj.AR_select = Select(name='ar_method', value='cube', options=['cube', 'best'])
obj.children = [obj.AR_select, obj.plot]
def setup_events(self):
super(StockApp, self).setup_events()
if self.AR_Select:
self.AR_select.on_change('value', self, 'input_change')
def input_change(self, obj, attrname, old, new):
self.plot.ar_method = new
@bokeh_app.route("/bokeh/abstract_rendering/")
@object_page("abstract_rendering")
def plot():
return Demo.create()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment