bokeh

How to check if my Bokeh Server Application is completely loaded and rendered?

老子叫甜甜 提交于 2019-12-01 05:56:54
I would like to integrate my Bokeh Server Application in Electron. So what I did is to run bokeh server using python-shell like this mainWindow = new BrowserWindow({ width: 1000, height: 700, show: false, }) var PythonShell = require('python-shell'); var options = { mode: 'text', pythonPath: 'python3', pythonOptions: ['-m'], scriptPath: '', args: ['serve','bokeh_project/'] }; PythonShell.run('bokeh', options, function (err, results) { if (err) throw err; console.log('results: %j', results); }); mainWindow.loadURL('http://localhost:5006'); mainWindow.once('did-finish-load', () => { mainWindow

How to reference selected bokeh data points

萝らか妹 提交于 2019-12-01 04:44:25
问题 I have created a bokeh figure which uses circle glyphs and which has a lasso_select tool. This is run from within a ipython notebook. When I view the figure (which is representing a scatter chart), I select the circles which appear as outliers. If there a way to reference the selected data from the notebook ? I suspect that source.selected (where source is the ColumnDataSource used to build the chart) would contain the data I want, however this always is set to: {'0d': {'flag': False,

Python: Bokeh hover date time

守給你的承諾、 提交于 2019-12-01 04:09:52
问题 I am trying to get a line plot via Bokeh in Python. I am new to Bokeh and I am trying to apply hover tool tips over the plot. The x-axis of the plot has Timestamp values which are converted into epoch string. I've reviewed some same problems here and tried to use the workaround for my case but it doesn't seem to work. On the plot it gives ??? where the time should show up. Any suggestions for my code? Timestamp is in format 2016-12-29 02:49:12 Also can someone tell how do I format x-axis

How to check if my Bokeh Server Application is completely loaded and rendered?

十年热恋 提交于 2019-12-01 04:01:11
问题 I would like to integrate my Bokeh Server Application in Electron. So what I did is to run bokeh server using python-shell like this mainWindow = new BrowserWindow({ width: 1000, height: 700, show: false, }) var PythonShell = require('python-shell'); var options = { mode: 'text', pythonPath: 'python3', pythonOptions: ['-m'], scriptPath: '', args: ['serve','bokeh_project/'] }; PythonShell.run('bokeh', options, function (err, results) { if (err) throw err; console.log('results: %j', results); }

What to use instead of bokeh.charts

我的梦境 提交于 2019-12-01 03:32:46
I am trying to run some code written by someone else, which contains the line from bokeh.charts import Bar When I run this in the Anaconda Prompt, I get the message "No module named 'bokeh.charts'". I have installed bokeh 0.12.13, so the problem isn't that I haven't installed it. Indeed, other bokeh modules run fine. I have noticed on the bokeh website that the 'charts' module says that it refers to a previous version (see https://bokeh.pydata.org/en/0.12.4/docs/reference/charts.html ). Does the latest version not have bokeh.charts? If so, is there an alternative? bokeh.charts was deprecated

Bokeh tools not working in QWebView

不打扰是莪最后的温柔 提交于 2019-12-01 03:21:49
问题 Good afternoon [ First time to post on stackoverflow after years of reading. Exciting! ] I use bokeh to generate html code that I feed into a QWebView in a very simple PyQt4 GUI. The standard tools on top of the bokeh chart do not work in the QWebView, while they work properly if I open the same html code in any standard browser (in my case, Chrome). Detailed example: I am using the snippet below taken from an older Bokeh User Guide example to test the issue (the latest User Guide can be

How to set the default style in Bokeh?

梦想与她 提交于 2019-12-01 03:13:43
问题 I'm writing a report whose plots are all rendered with Matplotlib . I've adjusted Matplotlib 's default to ensure that all plots have the same style. However, I need to use Bokeh since it provides support for rendering legends for Datashader - a library being developed by the folks at Bokeh . My issue is that the default Bokeh style is very different from my custom style. Rather than changing every single attribute in my Bokeh plot would it be possible to have Bokeh read from a style sheet in

Bokeh server + reverse-proxying with Nginx gives 404

让人想犯罪 __ 提交于 2019-12-01 00:20:30
I'm trying to set up a Bokeh server and reverse proxy it with Nginx. My p-website.conf now looks like: server { listen 80; server_name website.com; client_max_body_size 25M; access_log /var/www/logs/p-website.access.nginx.log; error_log /var/www/logs/p-website.error.nginx.log error; root /var/www/pydocs/website/production/src; include global/restrictions.conf; location /plot/ { proxy_pass http://website.com:5100; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header

bokeh overlay multiple plot objects in a GridPlot

对着背影说爱祢 提交于 2019-11-30 23:15:40
Say I have a class that holds some data and implements a function that returns a bokeh plot import bokeh.plotting as bk class Data(): def plot(self,**kwargs): # do something to retrieve data return bk.line(**kwargs) Now I can instantiate multiple of these Data objects like exps and sets and create individual plots. If bk.hold() is set they'll, end up in one figure (which is basically what I want). bk.output_notebook() bk.figure() bk.hold() exps.scatter(arg1) sets.plot(arg2) bk.show() Now I want aggregate these plots into a GridPlot() I can do it for the non overlayed single plots bk.figure()

JavaScript callback to get selected glyph index in Bokeh

久未见 提交于 2019-11-30 20:43:13
问题 I've created a visual graph using Bokeh that shows a network I created using Networkx. I now want to use TapTool to show information pertinent to any node on the graph that I click on. The graph is just nodes and edges. I know I should be able to use var inds = cb_obj.selected['1d'].indices; in the JavaScript callback function to get the indices of the nodes (glyphs) that were clicked on, but that's not working somehow and I get the error message, Uncaught TypeError: Cannot read property '1d'