Registry / data / brokenaxes

brokenaxes

JSON →
library0.6.2pypypi✓ verified 84d ago

Creates broken axes in matplotlib to plot data with discontinuities or different scales. Current version 0.6.2, release cadence sporadic.

pip install brokenaxes
INSTALL
IMPORT
SIG · BROKENAXES
B
brokenaxes
datapythonv0.6.2
Install
7.5s avg
Import
2577ms
Disk
180MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.2 · 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 2.596s · 177.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.5s · import 2.558s · 170MB
180MB installed
● package 180MB
Code
Verified usage

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

brokenaxes
from brokenaxes import brokenaxes
import brokenaxes
brokenaxes is a function/class, not a module; direct import may cause AttributeError

Creates a broken axes object with two x and y ranges, then plots data across the break.

import matplotlib.pyplot as plt from brokenaxes import brokenaxes import numpy as np fig = plt.figure(figsize=(6, 3)) bax = brokenaxes(xlims=((0, 0.1), (0.4, 0.6)), ylims=((0, 10), (20, 25)), hspace=0.05, wspace=0.05) x = np.linspace(0, 0.6, 100) y = 10 * np.sin(50 * x) + 20 * np.sin(5 * x) + 5 bax.plot(x, y) plt.show()
Debug
Known issues
gotchabrokenaxes modifies global matplotlib style; may affect other plots in same session.
fix
Reset matplotlib style after use: matplotlib.style.use('default')
affects: all
gotchaAuto-tick positioning can place ticks at discontinuities; subplots_advance() call needed to update ticks after plot.
fix
Call bax.standardize() after plotting to reposition ticks.
affects: all
deprecatedParameters like 'd' and 'tilt' are deprecated; use 'diag_color' and 'diag_kwargs' instead.
fix
Use diag_color='k' and diag_kwargs={'lw':2} instead of d and tilt.
affects: >=0.5.0
Errors
Common errors & fixes
AttributeError: module 'brokenaxes' has no attribute 'brokenaxes'
Importing the module instead of the function/class.
fix
Use: from brokenaxes import brokenaxes
ValueError: xlims must be a list of tuples or a tuple of tuples
Passing incorrectly formatted limits, e.g., a single tuple.
fix
Use: xlims=((0,1),(3,4)) — a list/tuple of two or more (min,max) tuples.
Upgrade
Version history
0.6.2latest on PyPI · released Sep 18, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
1
Resources
brokenaxes — pip install brokenaxes · libregistry