Skip to content

Tag: bokeh

Highlighting the neighborhood of a node on selection

I created a graph using networkx and I am trying to plot it using bokeh. Currently, I am able to highlight the node that I clicked on, as well as the edges linked to the selected node. To reproduce the example, see the following code inspired from the official bokeh tutorial: I would like to be able to highli…

Euro sign in Bokeh HoverTool

Python 3.10. Bokeh 2.4.3 I have searched and searched but I can’t find a solution. I’m trying to get a euro sign (€) to appear in a Bokeh HoverTool tooltip. The dollar sign is pretty easy to do: Changing the $ to a € doesn’t do anything. I’ve tried to somehow use the PrintfTickFormatte…

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. Now the color bar gives this result: But I’m not satisfied because I’d like to have a different scale of colors where all positive values are red and all negative…

Bokeh pie chart show percentage labels upside down

I have a dataframe with amounts grouped by categories and I want to generate a pie chart containing the percentages per category. I am using the Bokeh library in Python. My problem is that some percetange labels are not displayed properly in the pie chart as shown in the following image. Here is the code that…

Importing count() data for use within bokeh

I am trying to create a visualisation using the bokeh package which I have imported into the Databricks environment. I have transformed the data from a raw data frame into something resembling the following (albeit much larger): From there, I wish to create a line graph using the bokeh package to show the num…