bokeh

Holoviews chart not going away, even after jupyter lab notebook is closed

夙愿已清 提交于 2019-12-24 11:53:55
问题 My problem is very similar to this question. I'm not able to remove a chart I originally rendered with holoviews, despite shutting everything down. I'm reduced to opening the ipyb in sublime to see if I can find the relevant json section and rip it out by hand . In fact, please reference that link to see the example screenshot, since I can't share anything which contains company data. However, unlike that question, I don't have any extensions installed: jupyter labextension list JupyterLab v0

Bokeh “source” with different columns length

百般思念 提交于 2019-12-24 11:06:14
问题 I am trying to plot several time series in the same chart with bokeh. Some series will have different length than the others, but I want to keep them displayed. At this point, I have the warning telling me that all the column of the source don't have the same length, but Bokeh seems automatically adjusting sizes. An other important thing, I need to have all the 'Y' values of the time series in the same source , as I am using a callback in JS in order to create and interactive plot. The

How do I select data points based with a RangeSlider in Bokeh?

狂风中的少年 提交于 2019-12-24 10:46:00
问题 I am trying to build an interactive graph in Bokeh. So far let's say I have a heatmap like below. In plain English: I am using rect to draw rectangles producing a heatmap. I am adding a RangeSlider. I am attaching a js_callback on changes of the range. In the custom Callback, I am able to retrieve the start and end range of the range slider. What I am uncertain about is how to then select anything with it. This link (cb_obj.selected['1d'].indices) shows that one retrieve all selected data

Selecting dataframe rows for a scatter plot in bokeh

天涯浪子 提交于 2019-12-24 10:29:41
问题 What is the best way to select specific rows from a dataframe using a dropdown meun in Bokeh? I've tried using the modified script below that charts iris but got only a blank screen the server: import pandas as pd from bokeh.models import ColumnDataSource, ColorBar, CategoricalColorMapper from bokeh.plotting import figure, show from bokeh.palettes import Spectral6 from bokeh.io import curdoc from bokeh.layouts import column from bokeh.layouts import widgetbox from bokeh.sampledata.iris import

Displaying Paths with Geoviews

[亡魂溺海] 提交于 2019-12-24 08:48:01
问题 I'm trying to use geoviews to display a path. I can get it to display ONLY the points properly: import numpy as np import geoviews as gv import cartopy.crs as ccrs import pandas as pd hv.extension('bokeh') coord_system = ccrs.UTM(17) userLine = [[ 501386.89237725, 3026047.23276743], [ 502233.40219658, 3030363.86891928], [ 497065.22714886, 3031309.6654351 ], [ 499260.08171301, 3027147.9437062 ], [ 494678.08475863, 3026891.08691589], [ 494971.32963864, 3025188.1383645 ], [ 496475.86909916,

Why am I not seeing plot in bokeh application server?

六月ゝ 毕业季﹏ 提交于 2019-12-24 08:37:31
问题 I am learning bokeh and I am making an application. I ran the directory using the schema given in the documentation bokeh serve --show app , the code runs successfully and I see the rendering of template and CSS as I expected, but I do not see the plot that I want to generate. https://github.com/bokeh/bokeh/blob/master/examples/app/weather/main.py I followed this and also looked on Stackoverflow where it was advised to use curdoc() , but I still do not see the plot. I am using Python 3.6 and

Bokeh datetimetickformatter

谁说我不能喝 提交于 2019-12-24 07:51:34
问题 I'm have some trouble with the DatetimeTickFormatter object from Bokeh . Plots randomly won't generate/update. I have been searching and found this post at Bokeh , where it states that Plot not shown if DatetimeTickFormatter partially defined. I need some help with how to define it properly. Currently I'm doing this: from bokeh.models.formatters import DatetimeTickFormatter from bokeh.plotting import figure DTF = DatetimeTickFormatter() DTF.hours = ["%H:%M"] DTF.days = ["%d/%m/%Y"] DTF.months

How to link a multiselect widget to a datatable using bokeh in a jupyter notebook?

最后都变了- 提交于 2019-12-24 07:13:20
问题 I'm attempting to connect a datatable with a multiselect widget in bokeh. I've searched around and gathered that I need to develop a function to update the data source for the data table, but I seem to have two problems. I cannot seem to access the value of the multiselect object after I click it. I cannot seem to push the change to the notebook after receiving the change. Here's an example of my code: import pandas as pd from bokeh.io import push_notebook from bokeh.plotting import show,

How to change color of group of glyphs by hovering on a different glyph in Bokeh? Or show lines depicting the relationship

老子叫甜甜 提交于 2019-12-24 06:11:09
问题 I have the following plot using from bokeh.layouts import gridplot from bokeh.models import ColumnDataSource, CDSView, IndexFilter from bokeh.plotting import figure, show from bokeh.io import curdoc, output_notebook, output_file, export_png from bokeh.models import ( ColumnDataSource, Circle, Square, HoverTool,Grid, TapTool,PanTool, WheelZoomTool, BoxSelectTool,ZoomInTool, ZoomOutTool, CDSView, GroupFilter) curdoc().clear() output_notebook() source1 = ColumnDataSource(data=dict(x=[1, 2, 3, 4,

Datetime x axis in bokeh.charts.Area

倾然丶 夕夏残阳落幕 提交于 2019-12-24 05:53:19
问题 Why I plot my data with a datetime series as x axis, it is interpreted as a datetime value, but the wrong one: my 2016 times are interpreted as milliseconds after 1970-1-1. Code: from __future__ import absolute_import, division, print_function from __future__ import unicode_literals from datetime import datetime import pandas as pd from bokeh.charts import Area, show, output_file df = pd.DataFrame() df['date'] = [datetime(2016, 1, 1), datetime(2016, 1, 2), datetime(2016, 1, 3)] df['v1'] = [1,