Bokeh 2.3.3 is a specific version of the Bokeh interactive visualization library released in July 2021. It is a patch-release that primarily addresses bugs related to layouts and extensions. Key Features of Bokeh 2.3.3
Version Focus: As a minor patch release, its main goal was fixing regressions rather than adding major new features.
Fixes: Notable fixes included resolving an issue where the Column layout ignored the scrollable CSS class.
Legacy Context: This version still relied on older WebGL code, which some users found buggy, leading many to later upgrade to version 2.4.x for better performance. Working with Text in Bokeh 2.3.3
When developing text-based elements in this version, you typically use several core models and properties:
Axis Labels: You can add line breaks to labels using the \n string.
Text Properties: Visual attributes like text_color, text_font, and text_font_style can be applied to titles, labels, and annotations.
Mathematical Text: Bokeh 2.3.x supports rendering mathematical notation (LaTeX) via MathJax through the MathText model.
Text Glyphs: You can render text directly onto a plot using the text() glyph method, which allows for vectorized text placement. Usage Example (v2.3.3 Syntax)
To display a simple text label on a plot in this version, you would use the following structure:
from bokeh.plotting import figure, show p = figure(width=400, height=400) # Adding text glyphs p.text(x=[1, 2], y=[1, 2], text=["Label A", "Label B"], text_color="firebrick", text_font_size="20pt") show(p) Use code with caution. Copied to clipboard
For more detailed documentation, you can refer to the archived Bokeh 2.3.3 User Guide or see current installation options on PyPI. Styling visual attributes — Bokeh 2.3.3 Documentation
Bokeh 2.3.3 is a specific maintenance release of the popular Python library used for creating interactive, web-ready visualizations. Released in mid-2021, this version focused on stabilizing the significant architectural improvements introduced in the 2.x series. Overview of Bokeh 2.3.3
The primary purpose of Bokeh is to bridge the gap between powerful Python data analysis and the interactive capabilities of modern web browsers. Unlike static plotting libraries, Bokeh produces JSON objects that are rendered by BokehJS (a JavaScript library), allowing users to interact with data through zooms, pans, and hover tools without needing to write JavaScript themselves. Key Features and Capabilities
Interactive Graphics: Bokeh 2.3.3 excels at creating complex, high-performance dashboards and plots that handle large or streaming datasets.
Versatile Output: It supports multiple output formats, including standalone HTML files, server-side applications via the Bokeh Server, and integration within Jupyter Notebooks.
Customization: The library provides low-level control over every visual element, from glyph properties to layout positioning, while also offering high-level "charts" for quick data exploration.
Integration: It works seamlessly with the broader PyData stack, including Pandas dataframes and NumPy arrays. The Role of Version 2.3.3 bokeh 2.3.3
In the software lifecycle, version 2.3.3 served as a critical patch and refinement release. It addressed minor regressions and bugs found in previous 2.3 sub-versions, ensuring compatibility with evolving dependencies like Tornado and Jinja2. For developers at the time, it represented a stable environment for production-level dashboards before the eventual transition to the 3.0 release branch. Conclusion
Bokeh 2.3.3 remains a testament to the library's commitment to providing data scientists with a professional tool for communication. By simplifying the creation of "D3-style" visualizations using only Python, it democratizes high-end web design for the scientific community.
Bokeh 2.3.3, released in July 2021, was a critical patch release that prioritized stability and visual consistency within the Bokeh interactive visualization library. While minor versions like 2.3 introduced heavy-hitting features like multi-line axis labels and improved log-axis rendering, the 2.3.3 update focused on refining the user experience through precise layout and extension fixes. The Role of Patch Stability
In the software lifecycle, patch releases like 2.3.3 serve as the "finishing sander" for broader feature sets. Developers using Bokeh for high-stakes data dashboards require the library to behave predictably across various browser environments and CSS configurations. Version 2.3.3 addressed several "edge case" bugs that previously caused visual regressions or functional hiccups in complex layouts. Key Technical Improvements
The release notes for 2.3.3 highlight a series of targeted fixes that improved both the aesthetic and functional quality of Bokeh plots:
Layout & CSS Consistency: Fixed issues where the scrollable CSS class was ignored by column models and resolved layout regressions specifically affecting the Panel integration.
Visual Formatting: Addressed a bug that caused incorrect formatting of y-axis labels when specific themes were applied, ensuring that branded or custom-styled plots remained legible.
UI Component Reliability: Improved the MultiChoice widget by fixing a bug where dropdown menus were hidden, and ensured that active tabs were correctly brought into view upon rendering.
Extension Infrastructure: Mandated that extensions fetch exact versions from the Content Delivery Network (CDN), a change designed to prevent version mismatches that could break custom user-built components. Documentation and Community Support
Beyond code fixes, the 2.3.3 release coincided with an expansion of the Bokeh Documentation. The maintainers utilized this window to clarify existing guides, helping users better navigate complex topics like Bokeh Server deployment and custom JavaScript extensions. Conclusion
While Bokeh has since moved into the 3.x branch—which introduced major redesigns to CSS interoperability and removed support for legacy browsers like IE—version 2.3.3 remains a representative milestone of the 2.x era. It exemplified the project's commitment to incremental improvement, ensuring that the powerful data-linking and interactive capabilities introduced in the 2.3 series were reliable enough for production-level data science workflows.
Title: "Unlocking Stunning Visualizations with Bokeh 2.3.3: A Comprehensive Guide"
Introduction
Data visualization is an essential aspect of data science, allowing us to communicate complex insights and trends in a clear and concise manner. Among the numerous visualization libraries available, Bokeh stands out for its elegant, concise construction of versatile graphics. In this blog post, we'll dive into the features and capabilities of Bokeh 2.3.3, exploring how you can leverage this powerful library to create stunning visualizations.
What is Bokeh?
Bokeh is an interactive visualization library in Python that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of versatile graphics, and to extend this capability with high-performance interactivity. Bokeh can help anyone who would like to quickly and easily create interactive plots, dashboards, and data applications.
Key Features of Bokeh 2.3.3
Bokeh 2.3.3 comes with a wide range of tools and features that make data visualization a breeze. Some of the key features include:
Getting Started with Bokeh 2.3.3
To get started with Bokeh, you'll need to have Python installed on your machine. Then, you can install Bokeh using pip:
pip install bokeh
Here's a simple example to create a line plot using Bokeh:
import numpy as np
from bokeh.plotting import figure, show
# Create a sample dataset
x = np.linspace(0, 4*np.pi, 100)
y = np.sin(x)
# Create a new plot with a title and axis labels
p = figure(title="simple line example", x_axis_label='x', y_axis_label='y')
# Add a line renderer with legend and line thickness
p.line(x, y, legend_label="sin(x)", line_width=2)
# Show the results
show(p)
Advanced Features and Use Cases
Bokeh 2.3.3 is not just limited to simple plots. It's capable of creating complex dashboards and applications. Some advanced features and use cases include:
Conclusion
Bokeh 2.3.3 is a powerful and versatile data visualization library that can help you unlock the full potential of your data. With its elegant and concise API, Bokeh makes it easy to create stunning visualizations that are both informative and engaging. Whether you're a data scientist, analyst, or developer, Bokeh is definitely worth checking out.
Resources
By following this guide, you'll be well on your way to creating stunning visualizations with Bokeh 2.3.3. Happy visualizing!
Bokeh 2.3.3 , you are working with a legacy release of the powerful Python interactive visualization library. While newer versions exist, 2.3.3 is often maintained for specific dependency environments. 🛠️ Official Documentation & Installation The most authoritative "deep guide" is the archived Bokeh 2.3.3 User Guide
, which covers everything from basic glyphs to server deployment. Bokeh documentation Installation : Use pip to target this specific version: pip install bokeh==2.3.3 Sample Data
: To follow many tutorial examples, you may need to download the companion datasets using: bokeh sampledata Bokeh documentation 💡 Core Architecture: How 2.3.3 Works Bokeh operates on a two-part system: Python Library
: You define your plots, widgets, and logic in Python. It generates a declarative JSON object graph.
: A client-side JavaScript library that takes that JSON and renders the actual interactive visualization in the browser. Bokeh documentation 🗝️ Key Features in 2.3.3
Version 2.3.3 introduced or refined several critical features that were major updates at the time: Hatch Patterns
: Support for textured fills (dots, stripes, etc.) on all fill-able glyphs and annotations. Multi-line Labels : The ability to have multi-line axis and tick labels. WebGL Acceleration Bokeh 2
: Enhanced performance for large datasets (thousands of points) by offloading rendering to the GPU. SVG Export
: While PNG was standard, 2.3.3 documentation provides specific paths for exporting layouts as SVGs Bokeh documentation 🏗️ Building a Basic Plot In Bokeh 2.3.3, the bokeh.plotting interface is the most common entry point: # Create a figure with specific tools = figure(title= Basic Line Plot , x_axis_label= , y_axis_label= pan,wheel_zoom,box_zoom,reset # Add a renderer ], line_width= # Display the result Use code with caution. Copied to clipboard 🚀 Advanced Usage Bokeh Server
: Use this to build applications where Python code reacts to browser events (like sliders or selections). You run these apps via the bokeh serve Interactions CustomJS callbacks
for interactions that don't require a Python server, allowing your plots to remain interactive even as standalone HTML files. Integration : Seamlessly works with Jupyter Notebooks by calling output_notebook() Bokeh documentation ⚠️ Version-Specific Warnings Python Compatibility
: This version is typically used with Python 3.6 through 3.9. Check your environment if you encounter installation errors. Documentation Warning : Ensure you are looking at the /en/2.3.3/ path in the docs; the
documentation contains breaking changes and new syntax (like the bokeh.models overhaul) not present in 2.3.3. Bokeh documentation specific code example
(like a real-time dashboard or a complex map) to build with Bokeh 2.3.3? User guide — Bokeh 2.3.3 Documentation
pip install bokeh==2.3.3
or via conda:
conda install bokeh=2.3.3 -c conda-forge
Using Bokeh 2.3.3, they wrote a script to visualize the intensity. They decided to use a combination of box plots and scatter points to show not just the average noise, but the outliers—those moments when the crowd truly erupted.
Here is the Python script they used to generate the visualization:
from bokeh.plotting import figure, show, output_file
from bokeh.models import ColumnDataSource, BoxAnnotation
from bokeh.io import curdoc
from bokeh.layouts import gridplot
import pandas as pd
import numpy as np
# --- 1. Preparing the Data ---
# Simulating decibel data for the story
np.random.seed(42)
data_2019 = np.random.normal(loc=85, scale=5, size=1000)
data_2021 = np.random.normal(loc=92, scale=8, size=1000) # Louder and more varied
# Creating a DataFrame for Bokeh's ColumnDataSource
df = pd.DataFrame(
'decibels': np.concatenate([data_2019, data_2021]),
'year': ['2019 (Pre-Pandemic)'] * 1000 + ['2021 (Return)'] * 1000
)
# We'll use a simplified aggregation for the box plot glyphs manually for this example
# In a real scenario, you might use boxplot mod, but let's build it manually for the story effect
q1_2019, q2_2019, q3_2019 = np.percentile(data_2019, [25, 50, 75])
q1_2021, q2_2021, q3_2021 = np.percentile(data_2021, [25, 50, 75])
# --- 2. Setting up the Bokeh Figure ---
output_file("crowd_roar_analysis.html")
# Using version 2.3.3's robust handling of toolbar location and sizing_mode
p = figure(
title="Stadium Noise Levels: The Roar of the Return (2021 vs 2019)",
y_range=['2019 (Pre-Pandemic)', '2021 (Return)'],
width=800,
height=400,
x_axis_label='Decibels (dB)',
toolbar_location="above"
)
# --- 3. Visualizing the "Roar" ---
# Adding scatter points (jittered) to show density
# Bokeh 2.3.3 handles large numbers of glyphs efficiently
source = ColumnDataSource(df)
# Jittering the y-axis slightly for better visualization
p.circle(
x='decibels',
y='year',
source=source,
size=5,
alpha=0.3,
color="navy",
legend_label="Individual Readings"
)
# Adding the median lines (the story's climax)
p.segment(x0=q2_2019, y0='2019 (Pre-Pandemic)', x1=q2_2019, y1='2019 (Pre-Pandemic)',
line_width=4, color="red", line_dash="dashed")
p.segment(x0=q2_2021, y0='2021 (Return)', x1=q2_2021, y1='2021 (Return)',
line_width=4, color="red", line_dash="dashed")
# Highlighting the "Pain Threshold" (120 dB is the threshold of pain)
p.add_layout(BoxAnnotation(left=120, fill_color='red', fill_alpha=0.1, line_color='red'))
p.text(x=121, y=0.5, text=["Threshold of Pain"], text_font_size="10px", text_color="red")
# --- 4. The Reveal ---
p.legend.location = "top_left"
p.title.text_font_size = "14px"
show(p)
# Run with: bokeh serve app.py from bokeh.io import curdoc from bokeh.plotting import figure from bokeh.models import ColumnDataSource from bokeh.layouts import column from random import randomsource = ColumnDataSource(dict(x=[0], y=[0])) p = figure() p.circle(x="x", y="y", source=source)
def update(): new_data = dict(x=[source.data["x"][-1] + 1], y=[random()]) source.stream(new_data, rollover=20)
curdoc().add_root(column(p)) curdoc().add_periodic_callback(update, 1000)
| 2.3.3 | 3.x |
|-------|-----|
| output_notebook() | Same, but default theme changes |
| from bokeh.palettes import Viridis256 | Use Viridis256 from bokeh.palettes (still works) |
| p.legend.location = "top_left" | p.legend.location = "top_left" (same) |
| p.select_one("type": HoverTool) | p.select(type=HoverTool) (deprecation) |
datashader before passing data to Bokeh.numpy arrays instead of Python lists inside ColumnDataSource for faster serialization.Panel widgets.Working with categorical axes (e.g., bar charts with string categories) became more intuitive. The factor_cmap and factor_mark functions saw internal fixes, ensuring that color mapping and marker shapes apply correctly even when categories have long names or special characters.