Bokeh-Barplot-2
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()
# Sample 3: Bar Plot
categories = ['A', 'B', 'C', 'D', 'E']
values = [10, 20, 15, 25, 30]
bar_plot = figure(x_range=categories, title="Sample Bar Plot", x_axis_label='Categories', y_axis_label='Values')
bar_plot.vbar(x=categories, top=values, width=0.5, color='blue', legend_label="Bar")
GlyphRenderer(
id = 'p1092', …)
show(bar_plot)
Score: 5
Category: bokeh