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

adjusting x_axis_label or y_axis_label font/font size (Bokeh)

Is there a way to adjust x_axis_label and y_axis_label font/font size in Bokeh (0.70)? I am aware of a way to adjust title font size with the title_text_font_size property, with: figure (..., title_text_font_size="12pt") Is there a way to then…
Jonathan Shore
  • 880
  • 2
  • 8
  • 21
10
votes
2 answers

Geopandas: how to plot countries/cities?

I would need to plot some data on a geographic plot. Specifically, I would like to highlight countries and states where data comes from. My dataset is Year Country State/City 0 2009 BGR Sofia 1 2018 BHS New Providence 2 …
V_sqrt
  • 537
  • 8
  • 28
10
votes
1 answer

Image plot in bokeh with tight axes and matching aspect ratio

I'm using bokeh 1.0.1 version inside a Django application and I would like to display microscopic surface images as zoomable image plots with a color-encoded height and colorbar. In principle this works, but I have problems to get plots with the…
mcrot
  • 446
  • 2
  • 12
10
votes
1 answer

Share x-axis between Bokeh plots

In matplotlib you can share the x-axis between plots like so: plt.subplots(nrows=2, sharex=True) I would like to do something similar in Bokeh, where I zoom one, the other will follow, etc. How would I do that in Bokeh?
Jonas Byström
  • 25,316
  • 23
  • 100
  • 147
10
votes
5 answers

Bokeh Circle does not fit into square?

I am plotting some geometry using bokeh and came across this. I am plotting a rectangle with equal sides (i.e. a square), and in that square, plotting a circle with diameter = width of the square. The circle should tangent to the square at edges,…
Randall Goodwin
  • 1,916
  • 2
  • 18
  • 34
10
votes
5 answers

Background color of bokeh layout

I'm playing around with the Bokeh sliders demo (source code here), and I'm trying to change the background color of the entire page. Though changing the color of the figure is easy using background_fill_color and border_fill_color, the rest of the…
nbubis
  • 2,304
  • 5
  • 31
  • 46
10
votes
4 answers

How to import Bokeh palettes

How to use the D3 Palettes in Bokeh? I tried importing this way but I get an unresolved reference error message from bokeh.palettes import Category20 Bokeh version: print bokeh.__version__ 0.11.1
DougKruger
  • 4,424
  • 14
  • 41
  • 62
10
votes
2 answers

How to refresh Bokeh Document

I would like to refresh a bokeh document so I can replace old plots with new ones. However, right now I just get the new plots appended to the document so the old ones don't go away. #myfile.py from bokeh.plotting import curdoc, figure doc =…
Caleb Klaus
  • 101
  • 1
  • 6
10
votes
2 answers

How do I extract data from a Bokeh ColumnDatasource

I was trying to avoid using a ColumnDataSource and instead of that I was passing pandas dataframe columns directly to Bokeh plots. Soon though I had to implement a HoverTool which requires to have the data in a ColumnDataSource. So, I started using…
multigoodverse
  • 7,638
  • 19
  • 64
  • 106
10
votes
1 answer

Plotting Large Datasets in IPython Notebook (Bokeh)

I have a large dataset that I would like to plot in an IPython notebook. I read the ~0.5GB .csv file into a Pandas DataFrame using read_csv, this takes about two minutes. Then I try to plot this data. data =…
Dylan Kirkby
  • 1,427
  • 11
  • 19
10
votes
1 answer

Make bokeh charts with interactive controls in django

I have a django application which eventually uses embedded bokeh visualizations. Right now I get by using the bokeh.embed.components function and a template like: {{the_div|safe}} {{the_script|safe}} Thanks to this…
NublicPablo
  • 959
  • 11
  • 21
10
votes
3 answers

Bokeh how to add legend to figure created by multi_line method?

I'm trying to add legend to a figure, which contains two lines created by multi_line method. Example: p = figure(plot_width=300, plot_height=300) p.multi_line(xs=[[4, 2, 5], [1, 3, 4]], ys=[[6, 5, 2], [6, 5, 7]], color=['blue','yellow'],…
user187205
  • 330
  • 1
  • 2
  • 16
10
votes
6 answers

How do you change size of labels in the Bokeh legend in python?

I have several curves (of different colours) plotted in the same figure and would like to widen the corresponding coloured lines in the legend so that they are easier to differentiate when projected onto a large screen. I can access the properties…
airdas
  • 872
  • 2
  • 11
  • 19
10
votes
2 answers

Plot the whole pandas DataFrame with Bokeh

I would like to plot a whole pandas DataFrame with Bokeh. I.e., I am looking for a Bokeh equivalent of the third line: import pandas as pd income_df = pd.read_csv("income_2013_dollars.csv", sep='\t', thousands=',') income_df.plot(x="year") Is there…
Anarcho-Chossid
  • 2,210
  • 4
  • 27
  • 44
10
votes
1 answer

Log scale using Bokeh's scatter function

How do I get log scales when using Bokeh's scatter function. I'm looking for something like the following: scatter(x, y, source=my_source, ylog=True) or scatter(x, y, source=my_source, yscale='log')
MRocklin
  • 55,641
  • 23
  • 163
  • 235