Registry / data / bqplot

bqplot

JSON →
library0.13.1pypypi✓ verified 22d ago

bqplot is a 2-D visualization system for Jupyter, based on the constructs of the Grammar of Graphics. It provides interactive plotting for Jupyter notebooks, leveraging d3.js and ipywidgets. Every component of a bqplot plot is an interactive widget, allowing seamless integration with other Jupyter interactive widgets to create integrated GUIs. It offers both a flexible object model API and a concise pyplot-like API similar to Matplotlib. The library is actively maintained with frequent patch releases, and a major version (0.13.0) is in pre-release, indicating ongoing development.

pip install bqplot
INSTALL
IMPORT
SIG · BQPLOT
B
bqplot
datapythonv0.13.1
Install
11.4s avg
Import
1881ms
Disk
230MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.13.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.978s · 236.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 11.4s · import 1.784s · 229MB
230MB installed
● package 230MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pyplot
from bqplot import pyplot as plt
The Matplotlib-inspired, context-based API for quick plotting.
Figure
from bqplot import Figure, LinearScale, Axis, Lines
For the object model API, where components are explicitly constructed.

This quickstart demonstrates creating a simple line chart using bqplot's pyplot API, which is similar to Matplotlib's `pyplot`. It generates random data, creates a figure, plots the data, and displays the interactive chart in a Jupyter environment.

import numpy as np from bqplot import pyplot as plt # Generate some data size = 100 np.random.seed(0) x_data = np.arange(size) y_data = np.cumsum(np.random.randn(size) * 100.0) # Create a figure and plot fig = plt.figure(title="My First Plot") line_plot = plt.plot(x_data, y_data) # Display the plot (in a Jupyter environment, this might be implicit or use display(fig)) # For explicit display, you'd use from IPython.display import display; display(fig) fig
Debug
Known issues
breakingThe `bqplot` 0.12.x series (including 0.12.45) is explicitly compatible with `ipywidgets < 8.0`. Upgrading `ipywidgets` to version 8.0 or higher while using `bqplot` 0.12.x will lead to broken plots and runtime errors.
fix
For bqplot 0.12.x, ensure `ipywidgets` is installed as `pip install 'ipywidgets>=7,<8'`. To use `ipywidgets 8+`, you will need to upgrade to bqplot 0.13.x (when released, currently in pre-release) or newer.
affects: bqplot < 0.13.0
gotchaFor users of JupyterLab <= 2, an additional manual installation of JupyterLab extensions is often required for `bqplot` to render correctly. Without these, plots may appear as text representations (e.g., `<bqplot.figure.Figure object at 0x...>)` instead of interactive visualizations.
fix
After `pip install bqplot`, also run `jupyter labextension install @jupyter-widgets/jupyterlab-manager bqplot` and restart JupyterLab. This step is typically not needed for JupyterLab >=3 with `ipywidgets 7.6+`.
affects: All bqplot versions with JupyterLab <= 2
deprecatedIn the upcoming `bqplot` 0.13.x release, WebGL-based marks (e.g., `ScatterGL`) are being moved to a separate `bqplot-gl` package. Direct imports of these from `bqplot` will likely be deprecated or removed, requiring explicit imports from `bqplot_gl` and its installation.
fix
For WebGL marks, install `bqplot-gl` (`pip install bqplot-gl`) and import marks like `ScatterGL` from `bqplot_gl` directly.
affects: bqplot >= 0.13.0a0
Errors
Common errors & fixes
A Jupyter Widget
bqplot plots or other ipywidgets are not rendering correctly in JupyterLab, often appearing as text like '<bqplot.figure.Figure object at 0x...>' or simply 'A Jupyter Widget'. This typically indicates that the necessary JupyterLab extensions for widgets are not installed or enabled, or there's a version mismatch with `ipywidgets`.
fix
Ensure `ipywidgets` is compatible with your `bqplot` version (e.g., `bqplot 0.12.x` requires `ipywidgets < 8.0`). Then, install and enable the JupyterLab extensions: `pip install 'ipywidgets>=7,<8'` (for bqplot 0.12.x) followed by `jupyter labextension install @jupyter-widgets/jupyterlab-manager bqplot` and restart JupyterLab.
Error displaying widget: model not found
Similar to 'A Jupyter Widget', this error usually means that the frontend (JupyterLab or Jupyter Notebook) cannot find the JavaScript model corresponding to the Python widget. This is a common symptom of missing or incorrectly installed JupyterLab extensions or an incompatible `ipywidgets` version.
fix
First, ensure your `ipywidgets` version is compatible with your `bqplot` installation (e.g., `pip install 'ipywidgets>=7,<8'` for `bqplot 0.12.x`). Then, make sure the JupyterLab extensions are installed and enabled: `jupyter labextension install @jupyter-widgets/jupyterlab-manager bqplot`. Finally, restart JupyterLab.
Upgrading `ipywidgets` to version 8.0 or higher while using `bqplot` 0.12.x will lead to broken plots and runtime errors.
bqplot versions in the 0.12.x series (including 0.12.45) are explicitly incompatible with ipywidgets versions 8.0 or higher, leading to rendering issues and other runtime problems.
fix
For bqplot 0.12.x, downgrade ipywidgets to a compatible version: `pip install 'ipywidgets>=7,<8'`. To use ipywidgets 8+ with bqplot, you must upgrade to bqplot 0.13.x or newer (currently in pre-release).
TypeError: Could not compare [None] with block values
This specific TypeError has been observed when using `bqplot.market_map.MarketMap` with pandas DataFrames, and in some instances, it was identified as a browser-specific rendering issue (e.g., in Safari).
fix
Check for browser compatibility if encountered with `MarketMap`. Ensure the data passed to `MarketMap` is correctly formatted and complete, as missing or `None` values in unexpected places can trigger such type errors during internal data processing. Updating `bqplot` and related dependencies might also resolve underlying compatibility issues.
Upgrade
Version history
0.13.1latest on PyPI · released May 7, 2026
Audit
Dependencies
ipywidgetsrequiredCore dependency for interactive Jupyter functionality. Version 0.12.x requires ipywidgets < 8.0.
traitletsrequiredUsed for reactive data attributes in plot components.
traittypesrequiredExtension for traitlets to handle NumPy types.
numpyrequiredCommonly used for data generation and manipulation.
pandasrequiredCommonly used for data manipulation.
bqplot-gloptionalWill be a dependency for WebGL marks in bqplot 0.13.x; currently experimental/separate for 0.12.x.
Agent activity
24 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
bqplot — pip install bqplot · libregistry