bokeh

Why isnt Bokeh generating extra y ranges here?

你。 提交于 2019-12-20 05:28:06
问题 My Bokeh version is 0.12.13 and Python 3.6.0 I modified the example code available here: https://docs.bokeh.org/en/latest/docs/user_guide/plotting.html I have just tried to add one extra y range. from bokeh.plotting import output_file, figure, show from bokeh.models import LinearAxis, Range1d x = [1,2,3,4,5] y = [1,2,3,4,5] y2 = [10,9,8,7,6] y3 = [23,24,25,26,27] output_file("twin_axis.html") p = figure(x_range=(0,6), y_range=(0,6)) p.circle(x, y, color="red") p.extra_y_ranges = {"foo1":

Trouble embedding Bokeh plot into Flask app

折月煮酒 提交于 2019-12-20 02:56:56
问题 I'm new both to Bokeh and Flask. I browsed related questions, tutorials, and looked at Bokeh docs but could not figure out what I'm doing wrong. That being said, I want to create a simple web-app in which I "group together" various data reports and plots. According to what I read, I came up with the following: app.py: ... # imports app = Flask(__name__, static_url_path='/static') @app.route("/") def index(): return render_template("index.html") @app.route("/bokeh_test") def bokeh_test():

python bokeh, how to make a correlation plot?

这一生的挚爱 提交于 2019-12-20 02:53:07
问题 How can I make a correlation heatmap in Bokeh? import pandas as pd import bokeh.charts df = pd.util.testing.makeTimeDataFrame(1000) c = df.corr() p = bokeh.charts.HeatMap(c) # not right # try to make it a long form # (and it's ugly in pandas to use 'index' in melt) c['x'] = c.index c = pd.melt(c, 'x', ['A','B','C','D']) # this shows the right 4x4 matrix, but values are still wrong p = bokeh.charts.HeatMap(c, x = 'x', y = 'variable', values = 'value') By the way, can I make a colorbar on the

Sending URL parameter from Flask to a Bokeh server

对着背影说爱祢 提交于 2019-12-20 02:44:08
问题 I'm trying to integrate a Bokeh "autoloaded" server into a Flask app where the set of data to load would be chosen by the user on another page. The ID of this set of data is in the URL (get parameter), and I'm not able to send it from the Flask app to the Bokeh server. Some example code: # flask_app.py import subprocess import atexit import subprocess, os from flask import render_template, render_template_string, Flask from bokeh.embed import autoload_server from bokeh.client import pull

Bokeh: Vbar cannot be shown for datetime xaxis

若如初见. 提交于 2019-12-19 11:40:25
问题 I prepared two ColumnDataSource which has different data set for y axis. plot.line('x', 'y', source=source, line_width=2) plot.circle('x', 'y', source=source, fill_color="blue", size=8) plot.vbar(x='x', top='y', source=source1, width=0.5, bottom=0, fill_color="red")#this part doesn't work. And line and circle does work but when I tried to show the vbar for another data, it doesn't show but seems like the range of the axis is changed by the vbar codes. I tried to show only the vbar graph on

Bokeh DataTable won't update after trigger('change') without clicking on header

孤街浪徒 提交于 2019-12-19 09:56:08
问题 Bokeh version: 0.10 Python: 3.4 Jupiter: 4.x Goal: create a table that only shows data selected from a scatter plot Problem: the DataTable only refreshes itself after being clicked on despite the: s2.trigger('change'). In other examples on Bokeh site one plot will update another using this technique: see http://docs.bokeh.org/en/latest/docs/user_guide/interaction.html#customjs-for-selections the code below should run in a Jupyter notebook if you're using the above mentioned versions. and,

Bokeh patches plot with dates as x-axis shifts the ticks one to the right

▼魔方 西西 提交于 2019-12-19 09:01:12
问题 I'm trying to adapt the brewer example (http://docs.bokeh.org/en/latest/docs/gallery/stacked_area.html) to my needs. One of the things I'd like is to have dates at the x-axis. I did the following: timesteps = [str(x.date()) for x in pd.date_range('1950-01-01', '1951-07-01', freq='MS')] p = figure(x_range=FactorRange(factors=timesteps), y_range=(0, 800)) p.xaxis.major_label_orientation = np.pi/4 as an adaptation of the previous line p = figure(x_range=(0, 19), y_range=(0, 800)) The dates are

Simple username & password protection of a bokeh server

假装没事ソ 提交于 2019-12-19 04:43:22
问题 I have a simple bokeh server application and I want to expose it on a Linux-based Azure node. The server is there up and running. My question is: how to protect the content by username and password? I do not need necessarily authentication of users. My ideas so far (not tried, may not work) To create an extra bokeh server page with a text field. On the callback for a button, to add the test if the password fits. If it does, to redirect to the original server page. Otherwise, inform the user

Simple username & password protection of a bokeh server

守給你的承諾、 提交于 2019-12-19 04:43:06
问题 I have a simple bokeh server application and I want to expose it on a Linux-based Azure node. The server is there up and running. My question is: how to protect the content by username and password? I do not need necessarily authentication of users. My ideas so far (not tried, may not work) To create an extra bokeh server page with a text field. On the callback for a button, to add the test if the password fits. If it does, to redirect to the original server page. Otherwise, inform the user

Bokeh server + reverse-proxying with Nginx gives 404

China☆狼群 提交于 2019-12-19 04:24:27
问题 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";