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
10
votes
1 answer

How do you add more x axis ticks and labels to datetime axis using Python's Bokeh?

I've been testing out Python's Bokeh, specifically the candlestick chart tools but have been unable to figure out how to add more than 5 datetime labels/ticks to my chart. Any insight would be appreciated. Here's the code: from math import pi import…
BCR
  • 960
  • 11
  • 27
9
votes
1 answer

How to disable scientific notation in hvPlot plots?

I have just started using hvPlot today, as part of Panel. I am having a difficult time figuring out how to disable scientific notation in my plots. For example here is a simple bar plot. The axis and the tootltip are in scientific notation. How can…
SCool
  • 3,104
  • 4
  • 21
  • 49
9
votes
4 answers

Bokeh plot not showing with show(p) or p.show()

Trying to get a Bokeh chart to show with this code, I either get nothing if I use show(p) or AttributeError: 'Figure' object has no attribute 'show' How can I fix this? from math import pi import pandas as pd from bokeh.plotting import figure,…
RobD
  • 435
  • 4
  • 11
  • 21
9
votes
1 answer

How to plot a 2d array with bokeh?

Can someone give a short/simple example of how to plot a 2D-array with bokeh? Something similar to imshow() in matplotlib. I did not find a good examples given in the bokeh gallery. a = np.array([[1,2], [3, 4]]) imshow(a) # but with bokeh
Soerendip
  • 7,684
  • 15
  • 61
  • 128
9
votes
2 answers

Bokeh- datetime x_range: 'ValueError, Unrecognized range input'

I have a dataframe df2 that looks like: DATE | STATUS 2018-02-01 A 2018-02-02 A 2018-02-02 B .. 2018-02-05 B All the values are string type. I cannot seem to get the dates recognized as dates and plotted onto the x-axis of a…
machump
  • 1,207
  • 2
  • 20
  • 41
9
votes
1 answer

Bokeh Interactive legend hide multiple glyphs

I've enabled the hide legend option for my dataset. When I click it, only one bar goes off and others stay. I'm not quite sure what is causing the issue. Here's the bar plot before and after: . Here's what my data looks like: Here's the code: p =…
Pranav Menon
  • 181
  • 3
  • 10
9
votes
2 answers

How do stream data to a Bokeh plot in Jupyter with a high refresh rate?

I am trying to use Bokeh to plot a streaming dataset within a Jupyter notebook. Here is what I have so far. From the command line I start the bokeh server by running the command $> bokeh server Here is the code from my Jupyter notebook import…
Markus Bleuel
  • 91
  • 1
  • 4
9
votes
2 answers

Python, Bokeh: How to turn off auto-update of axes

I came across a strange auto-update behaviour of Bokeh server streaming plots. Essentially, with a streaming plot the axes ranges are updated automatically. When the ranges are changed manually, the new ranges persist only until the data is updated,…
user7435037
  • 343
  • 4
  • 14
9
votes
3 answers

Bokeh - multiple figures on same page

I have a need to have 2 bokeh figures on a page. I need them to separate from each other. Currently I can have only one figure (with multiple plots using grid/rows/columns) but not with multiple figures.
Taposh DuttaRoy
  • 411
  • 2
  • 5
  • 13
9
votes
3 answers

How to stop bokeh server?

I do use bokeh to plot sensor data live on the local LAN. Bokeh is started from within my python application using popen: Popen("bokeh serve --host=localhost:5006 --host=192.168.8.100:5006", shell=True) I would like to close bokeh server from within…
Moritz
  • 5,130
  • 10
  • 40
  • 81
9
votes
2 answers

How to capture value of dropdown widget in bokeh python?

The official documentation of bokeh 0.12.1 in the link give the below code for creating a dropdown. http://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#userguide-interaction-widgets But it doesn't clearly mention how to capture…
GeorgeOfTheRF
  • 8,244
  • 23
  • 57
  • 80
9
votes
2 answers

How to automatically adjust Bokeh plot size to the screen size of device used

I am using inline embedding to add a Bokeh plot to my web page. I would like to adjust its size when viewed from different devices, e.g. mobile, tablet, etc. but can't figure out how to do so. In my HTML, I've wrapped the Bokeh plot within a…
maria saz
  • 191
  • 1
  • 10
9
votes
1 answer

Plotting a graph on_click Datatable row selection in bokeh python 2.7

I would like from the following code that when the user clicks on a row from the datatable then on the call back event I would like to plot other data about the date. from datetime import date from random import randint from bokeh.models import…
user1129988
  • 1,516
  • 4
  • 19
  • 32
9
votes
2 answers

Streaming two line graphs using bokeh

I want to create a visualization where there are two line graphs that are updated with one new point per line graph per second. I have recently read about bokeh and found out that it can be used in visualizing streams of data in real-time. However,…
jtitusj
  • 3,046
  • 3
  • 24
  • 40
9
votes
1 answer

TimeSeries in Bokeh using a dataframe with index

I'm trying to use Bokeh to plot a Pandas dataframe with a DateTime column containing years and a numeric one. If the DateTime is specified as x, the behaviour is the expected (years in the x-axis). However, if I use set_index to turn the DateTime…
manu
  • 1,333
  • 2
  • 11
  • 24