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
54
votes
3 answers

How can I set the x-axis as datetimes on a bokeh plot?

I'm using bokeh with an ipython notebook. I want to plot a line graph in bokeh using a pandas DataFrame containing datetimes: import pandas as pd from datetime import datetime as dt from bokeh.io import output_notebook from bokeh.charts import Bar,…
Wilfred Hughes
  • 29,846
  • 15
  • 139
  • 192
51
votes
4 answers

One chart with two different y axis ranges in Bokeh?

I would like a Bar chart with Quantity information on the left y-axis, and then overlay a Scatter/Line plot with Yield % on the right. I can create each of these charts separately, but do not know how to combine them into a single plot. In…
brent5000
  • 973
  • 2
  • 8
  • 11
47
votes
4 answers

How can I accomplish `set_xlim` or `set_ylim` in Bokeh?

I create a figure in a function, e.g. import numpy from bokeh.plotting import figure, show, output_notebook output_notebook() def make_fig(): rows = cols = 16 img = numpy.ones((rows, cols), dtype=numpy.uint32) view =…
Brian
  • 3,453
  • 2
  • 27
  • 39
45
votes
2 answers

How to rotate X-axis labels in bokeh figure?

I'm just starting to use Bokeh. Below I create some args I use for the rect figure. x_length = var_results.index * 5.5 Multiplying the index by 5.5 gave me more room between labels. names = var_results.Feature.tolist() y_length =…
Liam Hanninen
  • 1,525
  • 2
  • 19
  • 37
42
votes
5 answers

How to change size of bokeh figure

I have read most of the documentation on bokeh and many of the examples. All of them contain the default square window. The only example I have seen that is the slightly different is here which has subplots and sets height and width in the creation…
Philliproso
  • 1,278
  • 1
  • 9
  • 16
41
votes
4 answers

Infinite horizontal line in Bokeh

Is there a way to plot an infinite horizontal line with Bokeh? The endpoints of the line should never become visible, no matter how far out the user is zooming. This is what I've tried so far. It just prints an empty canvas: import bokeh.plotting…
Tobias Hotzenplotz
  • 1,177
  • 1
  • 11
  • 15
39
votes
4 answers

X and Y axis labels for Bokeh figure

Does anyone know how to add x and y axis title/labels for a Bokeh figure? E.g. X-axis: time, Y-axis: stock price. Thanks a lot!
user3361508
  • 815
  • 3
  • 10
  • 11
38
votes
9 answers

Bokeh: ValueError: Out of range float values are not JSON compliant

I came across this discussion (from a year ago): https://github.com/bokeh/bokeh/issues/2392 I also saw the white screen without any errors..and then i tried to take a small subset of 2 columns and tried the below: Since pandas just gets a bunch of…
spiff
  • 1,335
  • 3
  • 11
  • 23
37
votes
2 answers

Hide Axis in Bokeh

How can I hide both x and y axis in a bokeh plot ? I've checked and tried based on this : p1= figure (... visible=None) p1.select({"type": "Axis", "visible": 0}) xaxis = Axis(plot=p1, visible = 0) and…
ArtDijk
  • 1,957
  • 6
  • 23
  • 31
34
votes
4 answers

When plotting with Bokeh, how do you automatically cycle through a color pallette?

I want to use a loop to load and/or modify data and plot the result within the loop using Bokeh (I am familiar with Matplotlib's axes.color_cycle). Here is a simple example import numpy as np from bokeh.plotting import figure, output_file,…
Steven C. Howell
  • 16,902
  • 15
  • 72
  • 97
34
votes
4 answers

In Bokeh, how do I add tooltips to a Timeseries chart (hover tool)?

Is it possible to add Tooltips to a Timeseries chart? In the simplified code example below, I want to see a single column name ('a','b' or 'c') when the mouse hovers over the relevant line. Instead, a "???" is displayed and ALL three lines get a…
bs123
  • 1,183
  • 3
  • 11
  • 21
34
votes
4 answers

Bokeh Plotting: Enable tooltips for only some glyphs

I have a figure with some glyphs, but only want tooltips to display for certain glyphs. Is there currently a way to accomplish this in Bokeh? Alternatively, is there a way to plot two figures on top of each other? It seems like that would let me…
Imaduck
  • 385
  • 1
  • 3
  • 6
33
votes
2 answers

Python Bokeh: remove toolbar from chart

Note from maintainers: The specifics of this question concern the bokeh.charts API which is obsolete and was removed several years ago. In modern Bokeh, specify toolbar_location: p = figure(toolbar_location=None) OBSOLETE: I don't seem to be able…
Arkady
  • 435
  • 1
  • 4
  • 9
31
votes
2 answers

Bokeh: save plot (as HTML) but don't show it

I am using Bokeh to produce HTML code including figures with show method This method ends on opening default browser with HTML opened in it. I want to save the HTML code, without showing it. How can I do that ?
RandomCoder
  • 6,606
  • 6
  • 22
  • 28
31
votes
5 answers

how to embed standalone bokeh graphs into django templates

I want to display graphs offered by the bokeh library in my web application via django framework but I don't want to use the bokeh-server executable because it's not the good way. so is that possible? if yes how to do that?
Ghada Ben Tekfa
  • 351
  • 1
  • 5
  • 9
1
2 3
99 100