Python bokeh.models.Select() Examples

The following are 7 code examples of bokeh.models.Select(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module bokeh.models , or try the search function .
Example #1
Source File: file_viewer.py    From ctapipe with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def create_dl1_widgets(self):
        self.w_dl1_dict = dict(
            extractor=Select(
                title="Extractor:",
                value="",
                width=5,
                options=BokehFileViewer.extractor_product.values,
            ),
            extractor_window_start=TextInput(title="Window Start:", value=""),
            extractor_window_width=TextInput(title="Window Width:", value=""),
            extractor_window_shift=TextInput(title="Window Shift:", value=""),
            extractor_lwt=TextInput(title="Local Pixel Weight:", value=""),
        )

        for val in self.w_dl1_dict.values():
            val.on_change("value", self.on_dl1_widget_change)

        self.wb_extractor = widgetbox(
            PreText(text="Charge Extractor Configuration"),
            self.w_dl1_dict["extractor"],
            self.w_dl1_dict["extractor_window_start"],
            self.w_dl1_dict["extractor_window_width"],
            self.w_dl1_dict["extractor_window_shift"],
            self.w_dl1_dict["extractor_lwt"],
        ) 
Example #2
Source File: bokeh_event_viewer.py    From ctapipe with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def create_view_widget(self):
        self.w_view = Select(title="View:", value="", options=[], width=5)
        self.w_view.on_change("value", self.on_view_widget_change)
        self.layout = column([self.w_view, self.layout]) 
Example #3
Source File: bokeh_event_viewer.py    From ctapipe with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def create_view_widget(self):
        self.w_view = Select(title="View:", value="", options=[], width=5)
        self.w_view.on_change("value", self.on_view_widget_change)
        self.layout = column([self.w_view, self.layout]) 
Example #4
Source File: file_viewer.py    From ctapipe with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def create_telid_widget(self):
        self.w_telid = Select(title="Telescope:", value="", options=[])
        self.w_telid.on_change("value", self.on_telid_widget_change) 
Example #5
Source File: file_viewer.py    From ctapipe with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def create_channel_widget(self):
        self.w_channel = Select(title="Channel:", value="", options=[])
        self.w_channel.on_change("value", self.on_channel_widget_change) 
Example #6
Source File: main.py    From bulkvis with MIT License 5 votes vote down vote up
def init_wdg_dict():
    """
    Initialise the widget dictionary, adds in the initial bulkfile selector
    Returns
    -------

    """
    wdg_dict = OrderedDict()
    wdg_dict['file_list'] = Select(title="Select bulk-file:", options=app_data['app_vars']['files'])
    wdg_dict['file_list'].on_change('value', update_file)
    return wdg_dict 
Example #7
Source File: DatVis_Bokeh_Intr_App_Build_4.py    From Python-Scripts-Repo-on-Data-Science with GNU General Public License v3.0 5 votes vote down vote up
def update_plot(attr, old, new):
    # If the new Selection is 'female_literacy', update 'y' to female_literacy
    if new == 'female_literacy':
        source.data = {
            'x': fertility,
            'y': female_literacy
        }
    # Else, update 'y' to population
    else:
        source.data = {
            'x' : fertility,
            'y' : population
        }

# Create a dropdown Select widget: select