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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How do I plot a grouped / clustered Bokeh bar chart?

In Bokeh you can easily make a stacked bar chart like this: from bokeh.io import output_file, show from bokeh.plotting import figure output_file("stacked.html") fruits = ['Apples', 'Pears',...
  • 789
0 votes
1 answer
33 views

Transparent backgroud for hover tooltip in bokeh3

I am migrating to bokeh 3 (from 2.4.3) trying to reproduce what I had i.e. transparent backgroud and a few customized styles for bk-tooltip. In bokeh 2 I could permanently amend it by using a css file ...
  • 1
0 votes
1 answer
33 views

How can I make a bar chart in Bokeh were positive/negative values have different colours?

In the below simple example code I have a bar chart with pos/neg values, how can I ammend the code to show green/red for pos/neg value bars? from bokeh.io import show from bokeh.plotting import figure ...
  • 789
0 votes
0 answers
18 views

How do we use index.html and styles.css for widgets on a Bokeh server?

I am trying to style widgets on my Bokeh server, including some Dropdowns, CheckboxGroups, RangeSlider, Tabs, and Divs. I have tried using serve static, jinga2, a separate index.html and styles.css ...
0 votes
0 answers
23 views

Embed Bokeh server with Django

I have tried to build a framework for a Django Bokeh application, but can't choose the bokeh server in a separate thread, so use server_document to build a script that can be sent to an html page. ...
0 votes
1 answer
13 views

Link DynamicMap to two streams in Holoviews

I have the following code that does mostly what I want it to do: make a scatter plot colored by a value, and a linked DynamicMap that shows an associated timeseries with each Point when you tap on it ...
  • 1,605
-2 votes
0 answers
15 views

Bokeh server django [closed]

I am looking for a recipe for how to implement a bokeh server application in a django application. Does anyone have an example for this? I've looked all over the internet, but haven't found any ...
0 votes
0 answers
51 views
+50

How to reopen bokeh html file and restore the last zoomed status of every figures?

I have a html file generated by bokeh gridplot which contains multiple figures. Suppose I open the html file, zoomed-in some (or all) figures to different levels and then closed the file. Next time ...
  • 375
2 votes
1 answer
62 views
+50

How to save the multiple figures in a bokeh gridplot into separate png files?

I have a html file generated by bokeh gridplot containing multiple figures. My use case is: I eye-check each figure, zoom-in/out individually. Then, I want click a button to save all the figures into ...
  • 375
0 votes
0 answers
9 views

Set the size of a PeriodicDataFrame

I'm using hvPlot and streamz to display real-time data from a Redis cache, in a Panel application. hvPlot is appending the datapoint to the chart, at one point when a limit of some kind of buffer is ...
1 vote
1 answer
19 views

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 ...
  • 789
0 votes
1 answer
16 views

Bokeh factor_cmap not working for scatter but works for vbar

I am trying to apply a factor_cmap to map simple data points to a scatter plot. I started with a simple example and tried to modify it and overlay a scatter to test if the same data and color map ...
  • 1
0 votes
1 answer
20 views

Using a checkbox widget in Holoviews to toggle visibility of Point plot

I have the following code which gives me a scatter plot of two groups of points: import pandas as pd import holoviews as hv hv.extension('bokeh') df1 = pd.DataFrame(data = {'x':range(1,5), 'y':range(...
  • 1,605
0 votes
0 answers
31 views

Holoviews show legend to Points plot based on marker type

Lets say I have the following dataframe: df = pd.DataFrame(data = {'id':['a','b','c','d'], 'value': [1,2,3,4], 'type':['x', 'x', 'y', 'y']}) id value type 0 a 1 x 1 b 2 x 2 c ...
  • 1,605
0 votes
0 answers
16 views

how off hovertool on nonselection glyph

I have this piece of code. I would like to turn off hovertool for nonselection nodes and edges. I thought to do it with visible in bokeh. graph_renderer = from_networkx(G, pos) hover_nodes = HoverTool(...
  • 1
0 votes
0 answers
33 views

Bokeh: How to access file from a Bokeh server which started from within the script itself (standalone/embedded server)

I am currently developing a Bokeh dashboard to display pdfs. When starting the bokeh server from within the script itself, I have trouble accessing local files. My directory structure looks as follows:...
0 votes
1 answer
30 views

Force update on bokeh server start

I have an application running on a Bokeh Server which renders data. The computation of the data is somewhat costly, and I want to show a loading screen while it is done. When the server has opened and ...
  • 3,507
0 votes
1 answer
33 views

Menu selection not working in Bokeh multiple dashboard generator

I have a script that prompts the user, using easgui, for the names of their systems of interest and parameters of interests and several other configs. Then proceeds to create Bokeh (using version '2.4....
  • 1
1 vote
0 answers
66 views

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' ...
  • 21
0 votes
0 answers
14 views

Bokeh legend adding extra dot when changing the category name

When values in a category are all numbers, legend works fine. When changing the first numerical value (0-> Air) it is still fine, But as soon as I change a second value (1-> Oil) or any other ...
0 votes
0 answers
15 views

Bokeh plotting circle with line based on datapoint count

Is it possible to make a logical loop where if one data point is availble then he bokeh shows a circle and if there are more than one datapoint is available then it draws a line. How to write such a ...
  • 1
0 votes
0 answers
17 views

How can plot my icons wherever my data points are in Bokeh?

I am plotting some soccer shot data. The plot is working just as I would like. Now, I am trying to modify it so that instead of the default circles that show on the scatterplot, I see soccer ball ...
0 votes
0 answers
26 views

How can I dynamically adjust x-axis of a Points graph based on data visible in another graph?

Context I want to plot a map with points on it, and next to it show a scatter plot of a parameter associated with those same points. Additionally I want the scatter plot x-axis range to scale ...
1 vote
1 answer
58 views

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

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 ...
  • 789
0 votes
0 answers
16 views

Is there an extension of 'bokeh' in panel library

I'm trying to upload a picture from an InputFile widget, then present it with an hvplot It works ideally using pn.pane.PNG but the problem is that I'm looking for a figure plotted with hvplot, which I ...
0 votes
0 answers
21 views

Executing pandasgui package raises a AttributeError

I'm new on python and want to use "pandasgui" package for leaning dataframe. When trying to run a demo script located on the official page of PyPI(text), import pandas as pd from pandasgui ...
2 votes
0 answers
48 views

Use range_tool in Bokeh with category value

I want to create a bar plot with range tool because the x-axis has a lot of categories. This is a sample code, I try to create bar plot with range tool based on AccountID in bokeh but it did not work: ...
1 vote
1 answer
42 views

Remove border/line around hvplot?

Is there a way to remove the border line around a plot created with hvplot/bokeh? import pandas as pd import hvplot.pandas df = pd.DataFrame({'x': [0, 1, 2, 3, 4, 5], 'y': [1, 1, 2, 2, 3, 4]}) df....
  • 27
0 votes
1 answer
42 views

How to color a datahader /holoview plot according to the diffrent custom category with color bar enabled

I have the following dataset df.head(10) lat long temperature(f) category 11.15 34.58 47.55 green 16.30 48.45 41.41 blue 17.53 48.70 32.787 blue 19.74 58.77 34.60 blue ...
0 votes
0 answers
15 views

bokeh.plotting.gmap.image - what should I put as first argument of this method?

I want to draw my own image instead of the circle on the map. Method circle works perfectly, however I have problem with method image. I do not know what should I put as first argument. According (...
0 votes
0 answers
21 views

overlapping layout with bokeh serve

I am encountering a bug when I plot this code: #Categorical axes #importing libraries from bokeh.plotting import figure from bokeh.io import curdoc from bokeh.models.annotations import LabelSet from ...
0 votes
1 answer
22 views

Override DOM style for Tabs, header level

I have been trying to custom my Tab widget with css_class overriding with it with a style.css as I used to do without previous bokeh versions, although since the 3.0. the same approach does not work. ...
  • 516
0 votes
0 answers
27 views

Bokeh labelset on the top - middle of the bar when doged.How?

I am not able to give a right position to my labelset. My data is changing in every 10 minutes, so it possible that one chart which had 3 doged bar(6bar) later will have 6 or so. I put the label on ...
  • 13
0 votes
1 answer
33 views

How to plot (visualize) a network representing a trained Neural Network with its weights with Bokeh?

I have trained a Neural Network on some data with the following Keras ANN set-up: estimator = Sequential() estimator.add(Dense(units=12, input_shape=(X.shape[1],), kernel_initializer='glorot_uniform', ...
  • 3
0 votes
0 answers
39 views

Interactive time series data over categorical feature

I am new to python. I want to learn how make an interactive plot, this is a time series data that I want to show DATE over categorical column (CODE) by selecting Source and ID and also once for all ...
0 votes
0 answers
19 views

Bokeh Slider to Make a Video out of Existing Bokeh Figures (Python)

I have a list of N Bokeh figures, all_figures. These figures already have images, shapes, etc. attached to them. I want to basically treat these figures as frames of a video, and have a slider that ...
0 votes
0 answers
21 views

Bokeh hover tool is showing ?? instead ColumnDataSource value

I'm a ingenieering student and I have never used before Python and I'm trying to create some inteactive Bland-Altman plots in bokeh where I want to show some specific parameters when the mouse is over ...
0 votes
0 answers
31 views

How to add page refresh to bokeh output file?

My goal is that my html file should be able to refresh itself in the browser. title2 = Div(text='<head><meta http-equiv="Refresh" content="4></head>') . . . layout = ...
  • 13
0 votes
0 answers
21 views

Using the start and end values of bokeh range_slider as inputs to python code

I would like to use the values of the start and end attributes of the bokeh range slider as inputs to the rest of my python code. I tried using range_slider.value and range_slider.value_throttled, but ...
  • 5
0 votes
0 answers
22 views

How to create a custom holoviews chart from a bokeh figure?

Currently, holoviews does not have charts with polar coordinate system when using bokeh extension. It's possible to draw such charts with bokeh (note: the page refers to v3, but the same code will ...
0 votes
1 answer
25 views

bokeh show series name when hovering over line on chart

I am plotting a line chart. I use the HoverTool so that when a user hovers over a line they can see the date & the value, this bit works. However it doesn't show them the series name, I have tried ...
  • 6,202
0 votes
0 answers
28 views

Bokeh bar coloring by data

I want to give a different color to my bar if the data I have two list filled with values. I need to compore one to the other. If A list index0 value is more than B list index0 value by 10%, than ...
  • 13
0 votes
0 answers
44 views

Out of range float values are not JSON complian when using save()

I am iterating to save multiple maps, but when I enter the second iteration at save time it gives me an error. I already tried doing each iteration manually and there is no error regarding NaN values ​...
1 vote
2 answers
58 views

bokeh: change line width on hover in multi line graph

I have a graph with multiple lines. I want to make a line in bold when hovered. Other lines should be untouched. In the example below, the tooltip works fine, but the hover_glyph doesn't. If I hover ...
  • 133
0 votes
0 answers
18 views

How to set the colormap range in hvplot.rgb?

In matplotlib one can anchor the upper/lower values of the colormap like: import rioxarray import xarray as xr import hvplot.xarray import matplotlib.pyplot as plt da = xr.open_dataset( "...
  • 11
0 votes
0 answers
14 views

How to run a bokeh server app without 'bokeh server --show' command in Django project?

I have a Django project in which I need to add graphs with python callbacks implemented in Bokeh. How to run a bokeh server app from django view without 'bokeh server --show my_app.py' command? I ...
  • 23
1 vote
0 answers
64 views

How to show axis coordinate information on a bokeh plot?

I currently have Hover implemented but it's a hassle with so much information to show. That's why I need to make an axis for my bokeh figure() that shows at the end the information of my axes, Date ...
  • 11
0 votes
1 answer
14 views

Python Bokeh Not Changing the Colour of the Text when Updating

I am trying to update the colour of a text on a plot I am creating. The code looks like this: plot = figure( x_axis_location="above", tools="hover,save", x_range=list(...
0 votes
0 answers
46 views

Getting this error when accessing Panel Dashboard on different computer in a network

I have deployed a panel app on IIS using reverse proxy method but when accessing the same I get the following error and the dashboard seems to be incompletely loaded in browser Exception in callback &...
1 vote
1 answer
25 views

Bokeh ColumnDataSource Error when identifying as source - why?

I'm getting error messages when identifying ColumnDataSource as my source, want to do it right. Let me show the errors. First, I generate some random data in a DataFrame and put it into the ...

1
2 3 4 5
94