Skip to main content

Create broken axes

Project description

brokenaxes makes matplotlib plots with breaks in the axes for showing data across a discontinuous range.

Features:
* Break x and/or y axes.
* Supports multiple breaks on a single axis.
* Automatically scales axes according to relative ranges.
* Plot multiple lines.
* Legend with positioning relative to entire broken axes object
* x and y label centered to entire x and y plot
* Make brokenaxes object a subplot itself with subplot_spec from GridSpec.

Example usage:

```
import matplotlib.pyplot as plt
from brokenaxes import brokenaxes
import numpy as np

fig = plt.figure(figsize=(5,2))
bax = brokenaxes(xlims=((0, .1), (.4, .7)), ylims=((-1, .7), (.79, 1)), hspace=.05)
x = np.linspace(0, 1, 100)
bax.plot(x, np.sin(10 * x), label='sin')
bax.plot(x, np.cos(10 * x), label='cos')
bax.legend(loc=3)
bax.set_xlabel('time')
bax.set_ylabel('value')
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brokenaxes-0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

brokenaxes-0.1-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file brokenaxes-0.1.tar.gz.

File metadata

  • Download URL: brokenaxes-0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for brokenaxes-0.1.tar.gz
Algorithm Hash digest
SHA256 450a6d5d47193a776852a83e8feefbde9eb2945b822b6720ef29272cd9c40c54
MD5 1c242426d6f3acb51b239332dcddb94e
BLAKE2b-256 337910f1c4aac77770703642057b172345125ede84855c93b84a97ac887b7482

See more details on using hashes here.

File details

Details for the file brokenaxes-0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for brokenaxes-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9dce77cc42f9a94fe66b215313d7ac467a90fd822a60d3a2b980c69744bfab6
MD5 22d67def59bd6a9418cc36b51fa87b36
BLAKE2b-256 e0b30ca582ceb47174c95de6cec72bdf71be97ae330e317457361b708e94ebe4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page