bokeh

bokeh taptool selection colours

牧云@^-^@ 提交于 2021-02-10 17:55:33
问题 I am using the TapTool in bokeh to select some circles which I have drawn on top of a gmap . Currently, the selected circle is in the foreground and the rest fade into the map background. Is there a way to change this default behaviour? I would like, for example, to give a different colour boundary to the selected circle and keep the rest the same. Is there a way to change the rendering of the selected and unselected objects? 回答1: The Styling Visual Attributes chapter of the User's Guide has

Color network graph node lines on click in Bokeh, Python

故事扮演 提交于 2021-02-10 14:21:55
问题 Using the following code with Bokeh server, I am currently able to color a selected node in my network graph pink by selecting it from a dropdown. What I'd like to do is extend the code to do is allow me to perform the same highlight callback, when a node is clicked , using Taptool() or some other method. Is this possible? import networkx as nx from bokeh.models.graphs import from_networkx from bokeh.models import Range1d, MultiLine, Circle, TapTool, Plot from bokeh.plotting import figure

bokeh hover tool - format date variable in custom html

和自甴很熟 提交于 2021-02-10 13:14:27
问题 I have dt_source = ColumnDataSource( { "date": result_detail['report_date_as_yyyy_mm_dd'] ,"contract": result_detail['contract_name'] ,"open_interest": result_detail['open_interest'] } ) tools="wheel_zoom,reset,save,crosshair,pan,box_zoom" oi = figure(plot_width=800, plot_height=200, x_axis_type="datetime", tools=tools, title="Open Interest") oi.line(x="date", y="open_interest", source=dt_source) oi.title_text_font_size = value("12pt") oi.ygrid.grid_line_color = None oi.yaxis.minor_tick_line

bokeh hover tool - format date variable in custom html

北城余情 提交于 2021-02-10 13:13:15
问题 I have dt_source = ColumnDataSource( { "date": result_detail['report_date_as_yyyy_mm_dd'] ,"contract": result_detail['contract_name'] ,"open_interest": result_detail['open_interest'] } ) tools="wheel_zoom,reset,save,crosshair,pan,box_zoom" oi = figure(plot_width=800, plot_height=200, x_axis_type="datetime", tools=tools, title="Open Interest") oi.line(x="date", y="open_interest", source=dt_source) oi.title_text_font_size = value("12pt") oi.ygrid.grid_line_color = None oi.yaxis.minor_tick_line

bokeh hover tool - format date variable in custom html

做~自己de王妃 提交于 2021-02-10 13:12:45
问题 I have dt_source = ColumnDataSource( { "date": result_detail['report_date_as_yyyy_mm_dd'] ,"contract": result_detail['contract_name'] ,"open_interest": result_detail['open_interest'] } ) tools="wheel_zoom,reset,save,crosshair,pan,box_zoom" oi = figure(plot_width=800, plot_height=200, x_axis_type="datetime", tools=tools, title="Open Interest") oi.line(x="date", y="open_interest", source=dt_source) oi.title_text_font_size = value("12pt") oi.ygrid.grid_line_color = None oi.yaxis.minor_tick_line

Export interactive Bokeh plots with widgets to standalone HTML

╄→гoц情女王★ 提交于 2021-02-10 08:09:12
问题 I'm looking for a way to export my Jupyter Notebook containing interactive Bokeh plots with widgets to standalone HTML. When using the Jupyter NB "download to" HTML function located in the toolbar, everything but the interactive Bokeh plots export well, also the static Bokeh plots (static plots are 'interactive' as well, but the underlying data does not change) How do I get the interactive plots with widgets working in a standalone HTML? Below you can find a working example in Jupyter

Export interactive Bokeh plots with widgets to standalone HTML

半城伤御伤魂 提交于 2021-02-10 08:07:15
问题 I'm looking for a way to export my Jupyter Notebook containing interactive Bokeh plots with widgets to standalone HTML. When using the Jupyter NB "download to" HTML function located in the toolbar, everything but the interactive Bokeh plots export well, also the static Bokeh plots (static plots are 'interactive' as well, but the underlying data does not change) How do I get the interactive plots with widgets working in a standalone HTML? Below you can find a working example in Jupyter

Export interactive Bokeh plots with widgets to standalone HTML

时光总嘲笑我的痴心妄想 提交于 2021-02-10 08:07:10
问题 I'm looking for a way to export my Jupyter Notebook containing interactive Bokeh plots with widgets to standalone HTML. When using the Jupyter NB "download to" HTML function located in the toolbar, everything but the interactive Bokeh plots export well, also the static Bokeh plots (static plots are 'interactive' as well, but the underlying data does not change) How do I get the interactive plots with widgets working in a standalone HTML? Below you can find a working example in Jupyter

Interactively change glyphs in bokeh plot

走远了吗. 提交于 2021-02-10 08:04:34
问题 I'm trying to generate a bokeh application which allows the user to change the glyphs of a plot. Unfortunately, the glyphs don't change after calling on_change() method of the dropdown button although I'm able to change the axis label in a similar way. However, changing plot.glyph outside of the called function works fine. from bokeh.layouts import layout from bokeh.models import ColumnDataSource from bokeh.models.widgets import Dropdown from bokeh.plotting import figure from bokeh.io import

Python Bokeh Range Does Not Change Upon Update

為{幸葍}努か 提交于 2021-02-08 11:36:57
问题 I'm working with bokeh to generate stock data, whereby the user selects a tickername and start/end dates to generate a graph. However, when selecting certain stocks, the y axis becomes distorted (See my previous question: Bokeh plot becomes distorted when certain stocks are inputted). I've tried to mitigate this by manually setting the y range as the min and max values of a stock upon selection, however, the new range does not update and the y axis does not change. How can I fix this issue?