Bokeh-Hbar-Plot-1

Sat 17 May 2025

from bokeh.plotting import figure, output_file, show
from bokeh.io import output_notebook
from bokeh.models import ColumnDataSource
# Set Bokeh output to notebook
output_notebook()
Loading BokehJS ...
# Sample 3: Bar Plot
categories = ['A', 'B', 'C', 'D', 'E']
values = [10, 20, 15, 25, 30]

# Sample 4: Horizontal Bar Plot
hbar_plot = figure(y_range=categories, title="Sample Horizontal Bar Plot", x_axis_label='Values', y_axis_label='Categories')
hbar_plot.hbar(y=categories, right=values, height=0.5, color='green', legend_label="HBar")
GlyphRenderer(
id = 'p1043', …)
show(hbar_plot)

Screenshot

image.png



Score: 5

Category: bokeh