Bokeh 2.3.3

from bokeh.plotting import figure, output_file, show from bokeh.models import HoverTool # Step 1: Configure output to a standalone HTML file output_file("bokeh_233_demo.html") # Step 2: Initialize your figure with specific dimensions and tools p = figure( title="Bokeh 2.3.3 Maintenance Release Demo", x_axis_label="X Axis", y_axis_label="Y Axis", plot_width=700, # Below the 600px restriction bug fixed in 2.3.3 plot_height=450, tools="pan,box_zoom,reset,save" ) # Step 3: Populate sample data x_data = [1, 2, 3, 4, 5] y_data = [6, 7, 2, 4, 5] # Step 4: Render your visual elements (glyphs) p.circle(x_data, y_data, size=15, color="navy", alpha=0.6) # Step 5: Inject custom interactivity hover = HoverTool(tooltips=[("Value (X, Y)", "(@x, @y)")]) p.add_tools(hover) # Step 6: Generate the visualization show(p) Use code with caution. ⚖️ When to Use Bokeh 2.3.3 Today

: Bokeh 2.3.3 runs smoothly on Python 3.6 to 3.9 (with limited support for 3.10). It does not require the latest versions of Jinja2 , PyYAML , or Pillow , making it ideal for environments with strict dependency pinning.

source = ColumnDataSource(data='x': x, 'y': y, 'y_filtered': y)

# Add a line renderer p.line('x', 'y', source=source) bokeh 2.3.3

from bokeh.plotting import figure, show, output_file from bokeh.layouts import column from bokeh.models import ColumnDataSource, HoverTool import numpy as np # Set up output target document output_file("bokeh_233_demo.html", title="Bokeh 2.3.3 Production Plot") # Build data properties using ColumnDataSource x_axis_data = np.linspace(0, 10, 100) y_axis_data = np.sin(x_axis_data) * 10 data_payload = 'x': x_axis_data, 'y': y_axis_data, 'rescale_color': ["#1f77b4" if val >= 0 else "#ff7f0e" for val in y_axis_data] source_engine = ColumnDataSource(data=data_payload) # Initialize figure core model plot_canvas = figure( title="Sinusoidal Tracking Canvas (Bokeh 2.3.3 Engine)", width=800, height=500, tools="pan,box_zoom,wheel_zoom,reset,save", sizing_mode="scale_width" ) # Apply specific 2.3 generation hatch configurations plot_canvas.vbar( x='x', top='y', width=0.08, color='rescale_color', fill_alpha=0.7, hatch_pattern="dot", # Component introduced in 2.3 line hatch_scale=5.0, hatch_alpha=0.4, source=source_engine ) # Setup customized tooltip rules hover_inspector = HoverTool( tooltips=[ ("Index Coordinate X", "@x0.00"), ("Value Magnitude Y", "@y0.00") ], mode='vline' ) plot_canvas.add_tools(hover_inspector) # Enforce explicit label styling fixed via bug #11110 plot_canvas.xaxis.axis_label = "Independent Time Domain (X)" plot_canvas.yaxis.axis_label = "Dependent Amplitude Response (Y)" plot_canvas.title.text_font_size = "14pt" # Generate structured column presentation layout validated by patch 2.3.3 final_dashboard_layout = column(plot_canvas, sizing_mode="scale_width") # Render layout show(final_dashboard_layout) Use code with caution. Deployment, Verification, and Upgrading

Bokeh 2.3.3 automatically tries to load BokehJS (the client-side library) from a CDN. If you're working in an air-gapped or offline environment, you can download the BokehJS static files separately and serve them locally.

# Create some data x = np.linspace(0, 4*np.pi, 100) y = np.sin(x) from bokeh

As a maintenance patch, Bokeh 2.3.3 does not introduce new visual glyphs or sweeping architectural changes. Instead, it serves as a critical stabilization release. By addressing several front-end layout issues, server rendering problems, and JavaScript-to-Python model synchronization errors, this version prevents visual regressions in complex analytical dashboards.

Released in July 2021, Bokeh 2.3.3 represents a vital maintenance milestone in the 2.x lifecycle of the Bokeh data visualization ecosystem . This release continues to be widely used in enterprise legacy systems, specific LTS Python environments, and production pipelines where stability and backwards compatibility are absolute priorities. 🛠️ The Purpose of Bokeh 2.3.3

: Production deployments linked to long-term enterprise systems cannot risk breaking changes introduced by the massive serialization overhaul of Bokeh 3.0. # Create some data x = np

import numpy as np from bokeh.layouts import column from bokeh.models import CustomJS, Slider, ColumnDataSource from bokeh.plotting import figure, show, output_file output_file("slider_callback.html") # Generate initial wave data x = np.linspace(0, 10, 500) y = np.sin(x) source = ColumnDataSource(data=dict(x=x, y=y)) # Build the plot plot = figure(plot_width=600, plot_height=300, y_range=(-2, 2)) plot.line('x', 'y', source=source, line_width=3, line_alpha=0.6) # Create a Slider widget slider = Slider(start=0.1, end=5.0, value=1.0, step=0.1, title="Frequency") # JavaScript callback code to execute in the browser callback = CustomJS(args=dict(source=source, slider=slider), codeblock=""" const data = source.data; const f = slider.value; const x = data['x']; const y = data['y']; for (let i = 0; i < x.length; i++) y[i] = Math.sin(f * x[i]); source.change.emit(); """) # Link callback to widget action slider.js_on_change('value', callback) # Arrange layouts cleanly into a vertical column layout = column(slider, plot) show(layout) Use code with caution. 6. Layout Management and Themes

from bokeh.plotting import figure, output_file, show from bokeh.models import ColumnDataSource, HoverTool # 1. Define the destination output file output_file("interactive_scatter.html") # 2. Prepare the data using a ColumnDataSource data = 'x_values': [1, 2, 3, 4, 5], 'y_values': [6, 7, 2, 4, 5], 'labels': ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon'] source = ColumnDataSource(data=data) # 3. Initialize the figure object p = figure( title="Bokeh 2.3.3 Interactive Scatter Plot", x_axis_label="X Axis", y_axis_label="Y Axis", plot_width=600, plot_height=400, tools="pan,box_zoom,reset,save" ) # 4. Add a circle glyph mapping the ColumnDataSource keys p.circle( x='x_values', y='y_values', size=15, source=source, color="navy", alpha=0.7, hover_color="firebrick" ) # 5. Add a highly responsive Hover Tool hover = HoverTool() hover.tooltips = [ ("Index", "$index"), ("Label", "@labels"), ("Coordinates", "(@x_values, @y_values)") ] p.add_tools(hover) # 6. Render the plot in a browser window show(p) Use code with caution. 5. Advanced Interactive Components

Bokeh 2.3.3 seamlessly translates Python data structures into JSON, which is rendered in the browser using BokehJS.

Here’s a helpful reference paper for — structured as a quick-start + cheat sheet for users who need to work with this specific version.