bokeh

how can i reference a specific rect in a Bokeh plot?

how can i reference a specific rect in a Bokeh plot? Question: I’m working on a plot with ornamentations that draw rectangles over the plot to highlight some sections. I’d like to find a reference for a rect that is plotted on top so that i can move it, unrelated to the data plotted. I …

Total answers: 1

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

How can I make a bar chart in Bokeh were positive/negative values have different colours? Question: 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 fruits = [‘Apples’, ‘Pears’, …

Total answers: 1

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

How to save the multiple figures in a bokeh gridplot into separate png files? Question: 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 separate png files. So each png …

Total answers: 1

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

How to plot selected columns of a Pandas dataframe using Bokeh 2.4.3 Question: 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. …

Total answers: 1

Bokeh ColumnDataSource Error when identifying as source – why?

Bokeh ColumnDataSource Error when identifying as source – why? Question: 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 ColumnDataSource: col_list = [‘ob1′,’ob2′,’ob3′,’ob4′,’ob5’] df = pd.DataFrame(np.random.uniform(73.965,74.03,size=(25, 5)).astype(float), columns=col_list) df.reset_index(inplace=True) df …

Total answers: 1

Add Labels to Bokeh hbar

Add Labels to Bokeh hbar Question: How can I Label the bars in the hbar-plot with values? Is there a way to manipulate the values of the x-axis? To get rid of the negative numbers for example from bokeh.palettes import GnBu3, OrRd3 from bokeh.plotting import figure, show fruits = [‘Apples’, ‘Pears’, ‘Nectarines’, ‘Plums’, ‘Grapes’, ‘Strawberries’] …

Total answers: 1

Creating more than 4 stacked line charts with bokeh interactive legends

Creating more than 4 stacked line charts with bokeh interactive legends Question: I was consulting the bokeh user guide (link) on creating interactive legends (see subsection on "Hiding glyphs"). The code given allows me to create up to 4 stacked line charts. For example, if I try to create a fifth line chart ("AAP"): p …

Total answers: 1

Put a clickable URL in a Bokeh plot?

Put a clickable URL in a Bokeh plot? Question: Is it possible to put a clickable URL in a Bokeh plot? I’m generating a lot of time series plots of online climate data, which are then browseable on a website. For each figure, I’d like to put a link to the original data webpage. This …

Total answers: 1