Newest 'bokeh' Questions - Stack Overflow

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.

0
votes
0answers
14 views

rendering lists in bokeh

I have pandas data frame object that basically has three columns: 1. date object 2. list of prices in that date 3. list of quantities I want to plot a bar graph in bokeh that shows each date ...
0
votes
1answer
7 views

How to fill a stacked bar diagram with patterns by using HatchPattern

I would like to add hatching fill patterns to a bokeh stacked bar diagram as written here for basic bars: https://github.com/bokeh/bokeh/pull/8859 Does anyone knows how to to that for stacked bars ...
0
votes
1answer
9 views

How to remove dates from start and end of the x-axis in Bokeh?

I am using Bokeh to plot amount against time in hours but the x-axis starts with the date 1/01 and ends with 1/02. I want to replace the dates with time maybe like 00:00. Here is how the plot is ...
0
votes
1answer
19 views

Bokeh Plotting 'Out of range float values are not JSON compliant' Issue

I try to build a heat map by using bokeh. However I keep getting the same error. I'll include both my code and error below, please help me out! I assumed that the error is mainly about Nan's in my ...
0
votes
0answers
20 views

Bokeh and pandas- plotting empty graph reading data from csv

We are trying to plot a circle graph from a simple CSV file with two columns using Bokeh for data visualisation and Panda to read the CSV. Following is our CSV file data where we are planning to plot ...
0
votes
0answers
16 views

Bokeh web server app to execute standalone html output

I have two separate bokeh python scripts. One which creates several documents, pdf's, excel notebooks, cvs files, and a standalone bokeh html through the output_file() and show() commands. The second ...
0
votes
0answers
14 views

How can i update the color_mapper / colorbar of an image plot by callback function?

I'm showing different 2D-arrays on an image plot. I've added additionally a color_mapper and a colorbar. The user has the ability to change the image by choosing out of a select-widget. That works ...
0
votes
1answer
9 views

Why is datetime in tooltip formatting returning 2tB?

At the moment all of my dates in the tooltip are being returned as Epoch figures, i.e. 1560846380 I've tried tooltips=[('Date', '@x{datetime}')...]) but I'm getting "2tB" as a result. My tooltip ...
1
vote
0answers
14 views

Is it possible to set figure axis_type in bokeh to geographical (long/lat)?

I'm creating an application using python bokeh that plots points on a map. I have lat/long points, and I want to lay my points over the cartodbpositron tile. All the examples that I've seen use the ...
0
votes
1answer
16 views

Invert y-axis valyes - Bokeh

I am attempting to create a line graph with an inverted y-axis. The y-axis I was hoping to create would have a maximum value of 1 (top) and a minimum axis value of 5 (bottom). I have not been able ...
0
votes
1answer
18 views

export_png Bokeh with all layers

I try to make bokeh plot and export it in PNG. When i add legend layer it export empty image and i don't know why. And when i exportinf png, i always watch this messege : "WARNING - The webdriver ...
0
votes
1answer
18 views

Take action based on values of Radiobutton and checkbox on button click in Bokeh

Need to generate a single plot based values selected from Radio-button and Checkbox. Radio button 1(RB1): Temperature, Humidity, Pressure. Radio button 2(RB2): For 24 Hrs, 48Hrs. Checkbox(CB1): ...
0
votes
1answer
29 views

How can I change an image-plot by select widget?

I want to use a select-widget/slider-widget to change an image-plot. Is there a way to do that? And if "no" what are my options to realize that issue? Here is a short example of what i've done: #...
0
votes
1answer
19 views

How can i update the ColumnDataSource by an “selected.on_change()” event?

First, I created a scatter plot out of geogr. coordinates. If i click on one of these circles a second line-plot next to that scatter plot shows further informations depending on what circle i've ...
1
vote
1answer
50 views

How do I load/display an html file into my QTextBrowser widget?

I'm teaching myself how to code UI in python with PyQt5. One of the things I want to do is take an html document saved in the same folder as my app and display its contents. It looked like ...
0
votes
1answer
18 views

How to get the old and new value from a js callback?

When I attach a Python callback to a widget I usually get the old and new values but for a js callback I only get the object and its current value, not the old value. Is this true? For example, for a ...
0
votes
1answer
81 views

Bokeh custom tool plotting a vertical line profile of an image

I need to plot a profile of an image, which is, to plot values of a matrix column. And to implement it as a drag tool, which would automatically update the lower plot based on cursor position over ...
0
votes
0answers
21 views

Bokeh: creation of interactive .html visualization with selector for dataframe column to display. javascript callbacks

Given the pandas dataframe below: xxx.csv x1,y1,y2,y3 1,1.1,1.3,1.5 2,4,8,16 3,9,14,21 After reading the data using the ColumnDataSource option I need to create an interactive chart ...
0
votes
1answer
25 views

Show all x-axis values on plot - Bokeh

I am attempting to show all x-axis values when I plot a line-graph in Bokeh. Currently, the output is as follows; The x-axis range is from 0-10, and I would like all to be displayed. I have seen ...
0
votes
1answer
27 views

How do I update a Bokeh server when data becomes available via callbacks?

I'm very new to event loops / callbacks in general. I'm using this server approach so I can run it in Pycharm easily, based on another post. I want to graph the results of iterative algorithms for ...
2
votes
1answer
68 views

Upload a CSV-file with complex numbers and read it in Bokeh web app

I want to upload a csv-file with complex numbers into a bokeh web app. The solution of DuCorey works perfectly for integer and floats, see: Upload a CSV file and read it in Bokeh Web app But when I ...
0
votes
1answer
22 views

the slider do not responce

I want to use the slider to change the figures, but it is no use. I think maybe the problem is in the Callback part. but i have no idea how to do it. month = [1,2,3,1,2,3,1,2,3,1,2,3] tilts = [1,1,1,...
0
votes
0answers
18 views

How to plot characters in Bokeh

I have a pandas DataFrame in which all the values are English alphabets or empty string "". My goal is to a) plot these alphabets by taking column index as X axis and the row index as Y axis (scatter ...
0
votes
1answer
18 views

the slider will not change the figures

i use bokeh to create a figure with sliders, but the sliders will not refresh the figure i have create a dataframe like this month = [1,2,3,1,2,3,1,2,3,1,2,3] tilts = [1,1,1,2,2,2,3,3,3,4,4,4] data =...
-1
votes
0answers
12 views

is there a way that i can use the sliders in Bokeh to change the dataset instead of changing the calculation [duplicate]

I have a several datasets, I want to plot the different datasets by changing one parameters in sliders, how should I do that? I used Bokeh, and i learn how to change the sliders and then changed the ...
0
votes
1answer
33 views

Bokeh how to handle datetime with ajax updating datasource

I am playing around with an new serverless reporting system built around Bokeh and AJAX and I am running into an issue with dates and times. I have a version that streams numerical data from a cloud ...
0
votes
0answers
12 views

how to do gridspec in bokeh

I am doing Matplotlib gridspec plots with Bokeh. In my problem, there are 2 columns and 2 lines. Each column on the first line contains one plot and only one plot that merge the 2 columns on the ...
0
votes
0answers
14 views

How to stream data to a Bokeh server using Holoviews

I want to stream data generated by python to a webpage. I came up with the following example, put together using examples from https://holoviews.org/user_guide/Streaming_Data.html and http://holoviews....
0
votes
1answer
19 views

Swap axes after plot object created in bokeh

I need to swap the x and y axes of a plot after the plot object has been created with Bokeh. I've tried to do this as follows but get the following javascript error: Javascript Error: Cannot read ...
0
votes
2answers
57 views

Implementing JavaScript callback for checkboxes in bokeh?

Short version: bokeh checkboxes with JS callbacks to plot subsets of a dataframe? Longer version: The answer here gives a good explanation for multiselect, but I want to do the same thing for ...
0
votes
1answer
42 views

Bokeh/Python: How to change data columns in CustomJS callback

Assume the source has 4 columns named time_s, time_min, time_h and y. source = ColumnDataSource(...) Then from those columns initially time_s and y are selected p = figure(tools=tools, ...
0
votes
1answer
50 views

How can I change the font of a PreText or Paragraph widget?

I've been trying to change the font of a PreText widget in Python Bokeh, but I failed until now. I already tried to format the text by using css: pre = PreText(text="text", width=1000, height=500, ...
0
votes
1answer
31 views

Trigger display of the HoverTool tooltips via CustomJS in bokeh

In a bokeh app, I want to reuse the rendering of tooltips created by the HoverTool. In particular, I want to select a datapoint in the datasource by some means and then show further information for ...
0
votes
0answers
20 views

How to get the autocompleted value?

I want to use a AutocompleteInput for a large number of completions. On change I want to get the completion. I noticed that the attribute value only stores what the user typed, not the completion he ...
1
vote
1answer
19 views

HoverTool on Bokeh: Time format issue (date do not appear correctly) x axis from datetime DF column in pandas

Here the code I wrote. I took the data from pandas DF (not pasted here). The x values are from DF index columns that is a DateTime column. The issue that I want to resolve is in line: TOOLTIPS = [("...
0
votes
1answer
28 views

Reposition to zero after hiding segments in bokeh stacked bar chart

I would like to use the click_policy functionality of a vertically stacked bar chart in bokeh to hide/show different segments of the bar chart and for the remaining segments to be aligned at y=0 (...
0
votes
0answers
15 views

Bokeh: is it possible to change the Coordinate reference systems from bokeh.tile_providers?

I would like to know if it is possible to add a tile in Bokeh with a different system' reference of the coordinates from bokeh.plotting import figure, show, output_file from bokeh.tile_providers ...
2
votes
1answer
28 views

Can I control the inline css created by Bokeh (or remove it completely)?

I'm creating a dashboard in PyViz panel, which uses bokeh under the hood as far as I understand. It is easy to use and I quickly get to a 90% solution, but the final layout is easier (for me) to just ...
0
votes
1answer
48 views

Bokeh custom action with custom icon

I'm trying to build some custom actions to a bokeh plot inside the toolbar and for these custom actions I also need custom icons. I've started from this example which creates a drawing tool. It ...
0
votes
1answer
18 views

Python: how to update bokeh patches field?

I am working with bokeh and I would like to update the field value of a patch. First I conver a geodataframe gdf into a GeoJSONDataSource from bokeh.models import LogColorMapper from bokeh.palettes ...
0
votes
1answer
12 views

Plot different data in the same window Bokeh

Is there a command to clear a plot window in Bokeh? I have a plot window like below: One can click on the datapoints in plot 1 or 2 and then it's corresponding blob is shown in plot 3 however I ...
0
votes
1answer
26 views

Bokeh vbar arguments sequences not same length?

I have a .csv with the following format that I load into a data frame: version, add, subtract, divide, multiply, mod, exp 1.0, 1, 2, 3, 4, 5, 6 1.1, 1, 2, 3, 4, 5, 6 1.2, 1, 2, 3, 4, 5, 6 I format ...
0
votes
2answers
56 views

How to plot a polygon with holes/voids in bokeh

System - Python 3.6.5, Bokeh 1.1.0, Shapely 1.6.4 I'm trying to plot a polygon with voids/holes in Bokeh. Here's my code: from shapely.geometry import LineString import numpy as np from bokeh....
0
votes
0answers
54 views

Bokeh Uncaught Error: property wasn't declared

I have successfully deployed my Django app on PythonAnywhere.com except for my Bokeh plots. Instead of rendering, this is the error that shows up in the console. bokeh-1.1.0.min.js:31 Uncaught Error:...
1
vote
1answer
26 views

How to make text in Bokeh tooltips wrap properly?

I have a graph, where each point is a post on Twitter. When you mouse over a point, a tooltip with a content of the post is displayed. The problem is that when tooltip is displayed on the left, the ...
0
votes
0answers
51 views

Interactive dataframe scatter plot in a standalone script (without jupyter)

TL/DR : What I am trying to do: Use dataframe (large existing dataset in df) Run as a stand alone script (no jupyter) Be able to easily interact/explore the data Simple but full example (seen lots ...
1
vote
1answer
37 views

Bokeh reset figure on success widget click

I am trying to create a widget callback function that resets the entire plot to its initialized state but it is not working. I expect the users to click Sample as many times as they want then be able ...
0
votes
0answers
24 views

How can I get the coordinates of a click in a plot on python side?

I have a plot with circles on it and I want users to be able to select circles and then I want to do some stuff on python side depending on the circle. I have tried JS callbacks but I get the error: ...
1
vote
0answers
21 views

Bokeh Interactive Legends Hovertool Callbacks

As shown below I used the example code of the Bokeh library. I tried add the hovertool and edit the output of the hovertool, but there are only "???" shown. Can anybody give me a tip, to add and ...
0
votes
0answers
29 views

Bokeh datatable to .csv with changing source

I have used Export.csv example in my app. The function works fine with static tables. However, I have another callback that applies some selections to the data using a MultiSelect widget and updates ...