Bokeh-Box-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()
import pandas as pd
box_data = pd.DataFrame({'categories': ['A', 'B', 'C'], 'values': [[10, 12, 9], [20, 19, 18], [15, 17, 16]]})
box_plot = figure(x_range=box_data['categories'], title="Sample Box Plot", x_axis_label='Categories', y_axis_label='Values')
box_plot.vbar(x=box_data['categories'], top=[pd.Series(v).mean() for v in box_data['values']], width=0.5, color='orange', legend_label="Box")
GlyphRenderer(
id = 'p1043', …)
show(box_plot)
Screenshot

Score: 5
Category: bokeh