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
1
vote
0 answers

bokeh: vary hover by node attributes in networkx

I have a graph with multiple node types and I would like to be able to show the attributes by hovering varying according to the node type; in the general case the number of attributes varies according to the node type. I don't want to have an…
HenryDrain
  • 13
  • 4
1
vote
0 answers

PYTHON: how can I add a linear regression to this bokeh?

how can I add a linar regression to this bokeh?, I have trouble with this, and dont know how to add to the figure the lr (don't know how to add to the curdoc expression). I've seen other posts, but havent found the way to add it to the bokeh.…
1
vote
2 answers

Show legend on UMAP plot

I am making an interactive UMAP plot, where you can hover the mouse over a datapoint to view the sample ID. My code works, showing a plot colour coded by class and with the hover feature working However, I can't figure out how to get it to show a…
1
vote
0 answers

How to integrate Bokeh Server into Django

Currently I have a Bokeh server running. I can access it and when I push some buttons then Python code runs in the background and finally a figure is plot. Now I need to add some things: I want users to authenticate. Users should be able to save…
Wiet
  • 21
  • 2
1
vote
2 answers

How to dynamically adjust y-axis zoom in Bokeh?

I'm trying to make it so mousewheel zoom only zooms the x-axis, and the y-axis will automatically rescale to fill available whitespace. Plot: And then I zoom in, there is unwanted whitespace: How do I get the y-axis to automatically rescale? from…
Jase
  • 1,025
  • 1
  • 9
  • 34
1
vote
1 answer

Bokeh: how to custom scale of ColorBar?

I make a figure (empty to simplify the code but I will add many elements), and a ColorBar to designate the color of different elements. from bokeh.models import LinearColorMapper, ColorBar, BasicTicker, PrintfTickFormatter from bokeh.plotting import…
Rinnosuke
  • 123
  • 8
1
vote
2 answers

Bokeh colorbar, assign a tick to each color

I'm trying to plot an heatmap of a matrix containing some counts (called mat in my code, then df after change the structure to use it with Bokeh). The structure is like this: X element 1 element 2 element 3 category 1 0 6 4 category…
Andrea
  • 91
  • 10
1
vote
1 answer

custom bokeh charts function not running

d = {"Fruits" : ["Apples","Bananas","Pears","Oranges","Melons"], "Ripe" : [10000,18000,19000,36000,50000], "Rotten" : [3000,8000,7000,10000,20000] } df = pd.DataFrame(d) df["Difference"]= df["Ripe"] - df["Rotten"] df I am…
1
vote
1 answer

Bokeh: show text in heatmap cells

I make heatmap: With this code: import pandas as pd from bokeh.models import BasicTicker, ColorBar, LinearColorMapper, PrintfTickFormatter, LabelSet from bokeh.plotting import figure, show df = pd.read_csv('data.csv', sep=';') colors =…
Rinnosuke
  • 123
  • 8
1
vote
1 answer

Bokeh colorbar customisation

Good day, I have the following colorbar for my Bokeh chart. My code for the colorbar is as follows: palette = brewer['Greys'][8] palette = palette[::-1] formatter = PrintfTickFormatter(format='%1.0f') color_mapper = LinearColorMapper(palette =…
CarlaVdB
  • 165
  • 11
1
vote
1 answer

why doesn't bokeh boxplot appear?

table I am working on: https://github.com/KeithGalli/pandas/blob/master/pokemon_data.csv When I create a boxplot for the 'HP' column with 'Generation' as the category it works fine code IMAGE OF BOXPLOT PRODUCED: def box_plot(df, vals, label,…
1
vote
1 answer

Dynamically change the coordinates and the text of annotation with slider in Bokeh plot

I have a Bokeh plot in which I have a slider. I want to change the coordinates of the line drawn with the slider, as shown in the screenshot of the figure. When I change the slider, the line changes its coordinates. I tried using a slider widget…
brocktree
  • 15
  • 4
1
vote
1 answer

BokehJS BoxZoomTool always active by default, even when setting active: false

In BokehJS 2.4.2 the BoxZoomTool is always active by default, even when setting the active property to false when adding the tool. const box_zoom = new Bokeh.BoxZoomTool({ active: false, }); plot.add_tools(box_zoom); With other tools, such as…
Mark wijkhuizen
  • 373
  • 3
  • 10
1
vote
1 answer

Holoviews QuadMesh edge opacity

Problem description: When using the QuadMesh plot in HoloViews one can observe white lines between all quadrilateral tiles even when using options like line_alpha=0, line_width=0. These apparent lines are actually gaps between the quads, since if…
Nox
  • 324
  • 3
  • 18
1
vote
0 answers

Plot 2D graph using Bokeh

I'm trying to plot a graph using Bokeh. I did it using matplotlib but I can't figure out how I can plot 2D array using Bokeh. This is my code for plotting with matplotlib: [row, col] = point_data.shape # select columns names text =…
Abirdh
  • 11
  • 2