bokeh

What is a fast and proper way to refresh/update plots in Bokeh (0.11) server app?

旧时模样 提交于 2019-12-31 12:19:08
问题 I have a bokeh (v0.11) serve app that produces a scatter plot using (x,y) coordinates from a data frame. I want to add interactions such that when a user either selects points on the plot or enters the name of comma-separated points in the text box (ie. "p55, p1234"), then those points will turn red on the scatter plot. I have found one way to accomplish this (Strategy #3, below) but it is terribly slow for large dataframes. I would think there is a better method. Can anyone help me out? Am I

Python Bokeh markup text value can't update

时间秒杀一切 提交于 2019-12-31 07:15:10
问题 I'm building Bokeh server to host an SQL query function, on the webpage I wanna print the query status so I used a Markup widget and updates text value of it. However the message of "Running query, please wait..." never show up, only the last value can display when function execution is done. How can I find where the problem is? Below is part of my code: def submit_query(): para_status.text = "Running query, please wait..." cnx = mysql.connector.connect(**SQL_config) query = clause_build()

Chart on click selection from data table in Bokeh

纵饮孤独 提交于 2019-12-31 05:38:05
问题 I've taken the below code from another source - it is not my own code. The code allows you to select a cell in the data table, and the 'downloads' data for that cell will chart based on the row of the cell selected. How do I expand this code such that if I have multiple variables (eg. 'downloads' and 'uploads') and so more columns in the data table, I can chart data based on that cell (so where row AND column are important)? Alternatively, how can I define as a variable the column number of a

Enable lines in Bokeh using Multiselect

独自空忆成欢 提交于 2019-12-30 14:45:10
问题 I read out loggers with time and humidity data on a few locations. To explore the data and distribute it I use Python (via jupyter notebook) and Bokeh. To simplify the data exploration I want to be able to enable and disable the I read out loggers with time and humidity data on a few locations. To explore the data and distribute it I use Python (via jupyter notebook) and Bokeh. To simplify the data exploration I want to be able to enable and disable the graphs of locations (and in the future

Adding python libraries to google datalab environment

喜你入骨 提交于 2019-12-30 09:45:35
问题 I'm using google datalab on google cloud platform. Worked great on the first try and I love how easy it is to now run a jupyter notebook server in the cloud (faster than starting up a localhost server). It's fantastic. But now I want to install python libraries not included in the basic datalab environment (specifically I need the Bokeh plotting library). So I opened a google cloud shell from the google cloud console where I manage this jupyter notebook instance, installed miniconda and then

How to interactively display and hide lines in a Bokeh plot?

房东的猫 提交于 2019-12-29 05:47:06
问题 It would be nice to be able to interactively display and hide lines in a bokeh plot. Say, I have created my plot something like this: from bokeh.plotting import output_file, figure, show from numpy.random import normal, uniform meas_data_1 = normal(0, 1, 100) meas_data_2 = uniform(-0.5, 0.5, 100) output_file("myplot.html", title="My plot") fig = figure(width=500, plot_height=500) fig.line(x=range(0, len(meas_data_1)), y=meas_data_1) fig.line(x=range(0, len(meas_data_2)), y=meas_data_2) show

Position of the legend in a Bokeh plot

不打扰是莪最后的温柔 提交于 2019-12-29 04:13:06
问题 Does anyone know how to carry the legend in bokeh outside of the graph? The only manipulation I could do was to choose a position among: top_right, top_left, bottom_left or bottom_right using: legend()[0].orientation = "bottom_left" and when I try different ones I get the error message: ValueError: invalid value for orientation: 'outside'; allowed values are top_right, top_left, bottom_left or bottom_right 回答1: As of Bokeh 0.12.4 it is possible to position legends outside the central plot

Running a very simple Bokeh Server example using Pycharm - No JSON object could be decoded

泪湿孤枕 提交于 2019-12-25 17:03:54
问题 The following code is a very simple bokeh server example retrieved from the Specifying output_server section. It works and I get a Bokeh plot on my browser if I run bokeh serve in one terminal and then this code in a desperate python shell from bokeh.plotting import figure, show, output_server p = figure(title="Server Plot") p.circle([1, 2, 3], [4, 5, 6]) output_server("hover") show(p) However, when I try to run this code from pycharm I get the following traceback: /usr/bin/python2.7 /home

Bokeh Sever with NGINX gives Blank white screen

断了今生、忘了曾经 提交于 2019-12-25 08:58:17
问题 I am using NGINX with bokeh server. I connect to the internal bokeh listener but on the external site i see just a blank white screen. The view page source shows the Bokeh code, the css and js static links work but no plots??? Can somebody help me here? 来源: https://stackoverflow.com/questions/46290307/bokeh-sever-with-nginx-gives-blank-white-screen

Bokeh: chart from pandas dataframe won't update on trigger

谁说我不能喝 提交于 2019-12-25 04:38:23
问题 I have got a pandas dataframe whose columns I want to show as lines in a plot using a Bokeh server. Additionally, I would like to have a slider for shifting one of the lines against the other. My problem is the update functionality when the slider value changes. I have tried the code from the sliders-example of bokeh, but it does not work. Here is an example import pandas as pd from bokeh.io import vform from bokeh.plotting import Figure, output_file, show from bokeh.models import CustomJS,