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

Transform ColumnDataSource back into DataFrame in Bokeh

I want to transform a CDS object containing my data back into a DataFrame object since there's still much cleaning to do before I actually pass the values to my glyphs. How can I do that? I tried my_df = pd.DataFrame(my_cds_object) But it…
1
vote
1 answer

Show/Hide columns in Bokeh DataTable based on selection

I have a data table with 40+ columns. I can choose which columns to show in the data table by changing the TableColumn attribute visible to True or False. Here's a small example filtered_table_data=df[["Date","Li","Be"]] filtered_table_source=…
Gingerhaze
  • 664
  • 2
  • 5
  • 13
1
vote
0 answers

How can I increase the height of the bokeh toolbar?

I am using Bokeh to create a webpage with tabs and figures. On one tab there is a map. I would like to increase the size of the toolbar (which is above the map) so it's more obvious for users that there is a toolbar there and they can use the tools…
Shara
  • 121
  • 2
  • 10
1
vote
1 answer

Bokeh plot is missing in layout when checkbox group is used

Bokeh scatter plot disappears when checkbox is added to layout. If I exclude layout = row([checkbox_group, p]) and do show(p), I get the intended scatter plot with the color bar. But when I include layout = row([checkbox_group, p]) and do…
1
vote
0 answers

Not possible to access selected file name in Panel FileInput widget

I am using python Panel FileInput widget (panel==0.13.0) to upload a file. Upload works, but I can’n find a way to access uploaded file name. However, after selecting file the widget displays filename next to it, but filename is not included in…
Saeid SOHEILY KHAH
  • 747
  • 3
  • 10
  • 23
1
vote
1 answer

Holoviews interactive plot of gridded data with slider on top

This code creates an interactive plot with Holoviews: import numpy as np import xarray as xr import holoviews as hv hv.extension('bokeh') # Create sample data x = np.linspace(-10, 10, 10) y = np.linspace(-10, 10, 10) time = np.arange(0, 10, 1) data…
hm8
  • 1,381
  • 3
  • 21
  • 41
1
vote
1 answer

How can I change the y-axis range based on a callback when the x-axis range changes in Bokeh?

I would like to change the visible range of the y-axis each time when the x-axis range changes. But something does not seem to work, panning and changing the x-axis range does not seem to invoke the callback or something is wrong with the…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Keep axis limits/zoom level when switching between two Points plots in holoviews/bokeh in Python

Say I have the following code, which switches between two holoviews Points plots based on a Radio Button. If you click on one of the points, a corresponding timeseries plot pops up to the right. import pandas as pd import holoviews as hv import…
hm8
  • 1,381
  • 3
  • 21
  • 41
1
vote
0 answers

Bokeh: DataTable columns collasping when updating layout

I noticed that when trying to update part of a Bokeh layout, the DataTable display changed (see attached picture) even though no modifications is made to the table explicitly in the code. The goal would be to update only one of the chart/table of…
K. Do
  • 1,256
  • 1
  • 7
  • 7
1
vote
0 answers

How to capture a click event on holoview points, I have to render some image as widget on double click/tap event on the points on hv.points

import holoviews as hv from holoviews import dim, opts import ipywidgets as widgets # Define a function that creates the widget you want to display def create_widget(point): return…
1
vote
0 answers

Problem with showing GoogleMap using gmap and Bokeh

I am trying to show Google Map (with some coordinates as Scatterplot) in Jypyter Notebook following blog instruction here. Approach 1: Using following code block in Jypyter, Error says, See JavaScript console for error. How can I solve it? import…
Tanmoy Das
  • 31
  • 5
1
vote
2 answers

Bokeh: hiding graph line by clicking on legend not working properly with webGL

Using Bokeh 2.3.3. I have inherited some Python code using Bokeh from an engineer who has left. I don’t understand Bokeh well. We have a graph which is rendering the same data twice, once as step, once as scatter, so we get a line with the points…
quite68
  • 31
  • 7
1
vote
1 answer

How to use Bokeh HoverTool with n number of columns

I'm trying to write a function that takes a pandas df as data source, with a selected number of columns and plot as (multiple) line chart using Bokeh: import pandas as pd import numpy as np from bokeh.plotting import figure, show from bokeh.models…
cJc
  • 813
  • 1
  • 11
  • 33
1
vote
0 answers

plot multiple horizontal bar charts on a single figure with multiple axis

I am trying to create a market profile / volume profile chart like this or this in Bokeh (or anything else - plotly?). Basically, I want to make a plot with horizontal bar charts on it where 'bins' define edges of bars in a bar plot, 'amt' defines…
Dimasik
  • 21
  • 4
1
vote
1 answer

How to plot selected columns of a Pandas dataframe using Bokeh 2.4.3

For future visitors: My original question was closed as a duplicate, but the old 'multiline' function in the linked answer is depreciated years ago. I would like to plot a selection of pandas columns using bokeh, i.e. multiple lines in one chart.…
cJc
  • 813
  • 1
  • 11
  • 33