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
21
votes
2 answers

Bokeh: AttributeError: 'DataFrame' object has no attribute 'tolist'

I am new to pandas and bokeh and I am trying to create a scatter plot from a pandas dataframe. However, I keep getting the following error: new_data[colname] = df[colname].tolist() AttributeError: 'DataFrame' object has no attribute 'tolist'…
Jab
  • 821
  • 3
  • 13
  • 26
21
votes
3 answers

How do I use custom labels for ticks in Bokeh?

I understand how you specify specific ticks to show in Bokeh, but my question is if there is a way to assign a specific label to show versus the position. So for example plot.xaxis[0].ticker=FixedTicker(ticks=[0,1]) will only show the x-axis labels…
user3708379
  • 213
  • 1
  • 2
  • 5
20
votes
3 answers

Pandas dataframe error: matplotlib.axes._subplots.AxesSubplot

import pandas as pd import matplotlib.pyplot as plt file = 'd:\\a\\pandas\\test.xlsx' data = pd.ExcelFile(file) df1 = data.parse('Link') df2 = df1[['dataFor', 'total']] df2 returns: print (type(df2)) tells me class…
vbd
  • 3,437
  • 4
  • 32
  • 45
20
votes
2 answers

Purpose of columnDataSource in bokeh

I am new to bokeh and trying to figure out what columnDataSource does. It appears in many places but I am uncertain of its purpose and how it works. Can someone illuminate? Apologies if this is a silly question...
rpj
  • 223
  • 1
  • 3
  • 8
20
votes
5 answers

How do I work with images in Bokeh (Python)

For example you can plot an image in matplotlib using this code: %matplotlib inline import matplotlib.pyplot as plt import matplotlib.image as mpimg img=mpimg.imread('image.png') plt.imshow(img) Is something like this possible with Bokeh(0.10)?
Trevor McCormick
  • 366
  • 1
  • 3
  • 12
20
votes
2 answers

Embedding a bokeh app in flask

I am trying desperately to embed a working bokeh applet into flask, and can't find a proper way to do this. I looked through all the examples, but I can't find one which includes the ability to update the data (best example: the sliders_applet). If…
lakerz
  • 1,051
  • 3
  • 12
  • 20
19
votes
1 answer

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

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…
user2700854
  • 193
  • 1
  • 1
  • 5
19
votes
2 answers

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

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 =…
Eike P.
  • 3,333
  • 1
  • 27
  • 38
19
votes
2 answers

how to adjust # of ticks on Bokeh axis (labels are overlapping on small figures)

I have a multi-figure Bokeh plot of vertically stacked & aligned figures. Because I want to align the plots vertically, the y-axis labels are rotated to be vertical rather than horizontal. In certain scenarios, Bokeh produces too many ticks, such…
Jonathan Shore
  • 880
  • 2
  • 8
  • 21
19
votes
2 answers

Bokeh Plot with equal axes

Bokeh Plot with equal axes I created a Plot with the Python library Bokeh (see code). from bokeh.plotting import * figure() hold() rect([1,3], [1,1], [1,0.5], [1,0.5]) patch([0,0,4,4], [2,0,0,2], line_color="black", fill_color=None) show() How can…
Spirou
  • 257
  • 4
  • 10
18
votes
1 answer

Embed an interactive Bokeh in django views

I want to make interactive plot in django views (or model ?). Let's say I want to use selection_histogram example. I think Bokeh fit my needs because, I have matplot/seaborn that I can reuse and I'm not pretty good at javascript. There was no…
Thomas PEDOT
  • 943
  • 1
  • 9
  • 18
18
votes
1 answer

Does Bokeh API Support 3D Plots?

I've been poking around the Bokeh API docs for a few hours, and haven't found anything relevant. So I wanted to ask if anyone knows whether or not the Bokeh API supports 3D ploting (similar to what you can do in matplotlib with…
semore_1267
  • 1,327
  • 2
  • 14
  • 29
18
votes
3 answers

Display a pandas data frame with Bokeh

Is there a nice way to display data frames with Bokeh? I have a bunch of table-based text I'd like to display and dynamically update along with some graphs, but I haven't found a good way to do this yet.
helloB
  • 3,472
  • 10
  • 40
  • 87
18
votes
1 answer

Timeseries streaming in bokeh

I want to plot a live time series in bokeh. I want to plot only the new data points at each update. How can I do this ? There is an example on the bokeh website for animated plots but it involves redrawing the whole picture every time. Also I am…
Maxi
  • 547
  • 1
  • 7
  • 18
17
votes
1 answer

What to use instead of bokeh.charts

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…
ignoring_gravity
  • 6,677
  • 4
  • 32
  • 65