Questions tagged [bokeh]

Bokeh is a library for interactive visualization (including streaming or large datasets) that targets modern web browsers for presentation, and high level languages such as Python, Scala, and R for use.

Bokeh is an interactive visualization library for high level languages such Python, R and Scala, that natively targets modern web technologies. It is easily embeddable in common web-frameworks and can be used for standalone interactive documents, or server-backed data applications for large and streaming datasets.

4729 questions
14
votes
1 answer

How to get interactive bokeh in Jupyter notebook

I'm gearing up towards using bokeh for an interactive online implementation of some python models I've written. Step 1 is understanding some basic interactive examples, but I can't get the introductory examples running INTERACTIVELY in a Jupyter…
Mark_Anderson
  • 1,229
  • 1
  • 12
  • 34
14
votes
3 answers

Right way to plot live data with django and bokeh

i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage. #view.py def view_plot(request): f=figure() f.plot(#some data#) session =…
14
votes
2 answers

Using colormap with bokeh scatter

In matplotlib the scatterplot offers the possibility of using the color of a plot to indicate value or magnitude like this plot: For bokeh, similar examples seem to manually generate the rgb colors, which makes it difficult to produce plots with…
M.T
  • 4,917
  • 4
  • 33
  • 52
14
votes
1 answer

Hierarchic pie/donut chart from Pandas DataFrame using bokeh or matplotlib

I have the following pandas DataFrame ("A" is the last column's header; the rest of columns are a combined hierarchical index): A kingdom phylum class order family genus …
13
votes
3 answers

Adding node labels to bokeh network plots

I am using the following code to produce an interactive bokeh network graph. How do I add the name of the nodes to the nodes in the bokeh plot? from bokeh.io import show, output_notebook from bokeh.models import Plot, Range1d, MultiLine, Circle,…
Kate Lewis
  • 131
  • 1
  • 3
13
votes
4 answers

Position the legend outside the plot area with Bokeh

I am making a plot following the example found here Unfortunately, I have 17 curves I need to display, and the legend overlaps them. I know I can create a legend object that can be displayed outside the plot area like here, but I have 17 curves so…
Despe1990
  • 595
  • 1
  • 3
  • 21
13
votes
2 answers

Throttling in Bokeh application

I have Bokeh application with a Slider widget that uses the Slider.on_change callback to update my graphs. However, the slider updates come in much faster than my callback function can handle so I need a way to throttle the incoming change requests.…
Emile
  • 2,200
  • 27
  • 36
13
votes
1 answer

How to embed Bokeh server in Django application

From what I read the dynamic and big data rendering capabilities of Bokeh are accessible by use of the bokeh-server. In Bokeh documentation there is a brief mention of embedding the bokeh-server in a Flask application using the blueprint api. This…
Rubber Duck
  • 3,673
  • 3
  • 40
  • 59
13
votes
1 answer

Plot topics with bokeh or matplotlib

I'm trying to plot topic visualization from a model. I want to do something like bokeh covariance implementation. My data is: data 1: index, topics. data 2: index, topics, weights(use it for color). where topic is…
sb32134
  • 426
  • 8
  • 19
12
votes
1 answer

Showing cropped image in bokeh

I am showing a picture in a figure in bokeh and am using the BoxSelectTool in order to draw a rectangle. box_select = BoxSelectTool(callback=callback) p2 = figure(x_range=(0,700),…
TobSta
  • 766
  • 2
  • 10
  • 29
12
votes
3 answers

Bokeh: DataTable - how to set selected rows

I would like to change the DataTable object row selection programmatically (without JS, just python). I have tried to so using the selected property of the underlying ColumnsSource with no success. How can this be done?
Hanan Shteingart
  • 8,480
  • 10
  • 53
  • 66
12
votes
2 answers

Upload a CSV file and read it in Bokeh Web app

I have a Bokeh plotting app, and I need to allow the user to upload a CSV file and modify the plots according to the data in it. Is it possible to do this with the available widgets of Bokeh? Thank you very much.
ssm
  • 620
  • 6
  • 24
12
votes
3 answers

interactive conditional histogram bucket slicing data visualization

I have a df that looks like: df.head() Out[1]: A B C city0 40 12 73 city1 65 56 10 city2 77 58 71 city3 89 53 49 city4 33 98 90 An example df can be created by the following code: df =…
codingknob
  • 11,108
  • 25
  • 89
  • 126
12
votes
2 answers

Bokeh: Automatically refreshing bokeh plots

I'm trying out an example Bokeh Application (in 'single module format') for generating a chart from a dataset. In the given example, the user on the web page can click on a button and the chart will update with the latest data. I am trying to figure…
ChaimKut
  • 2,759
  • 3
  • 38
  • 64
12
votes
3 answers

Plot a pandas dataframe using the dataframe index for x coordinate in bokeh

I want to prepare a bokeh plot that uses a ColumnDataSource. The pandas DataFrame that is the source of the data has one column and a datetime index: How do I specify that the x value should be the index. I tried just omitting it, hoping that would…
Krastanov
  • 6,479
  • 3
  • 29
  • 42