Skip to main content

Automatically add multiple x-axis labels to your matplotlib subplots.

Project description

manylabels collage

manylabels

Many plots in the heliophysics science community are of satellites showing various physical observations. To place these observations in context, scientists often include multiple x-axis labels showing, for example, the satellite location. This is surprisingly hard to implement using matplotlib. Nevertheless, manylabels.ManyLabels() class provides this functionality.

Installation

$ python -m pip install manylabels

Example

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import manylabels

n = 100
x = np.array([pd.Timestamp(2000,1,1,5,0,0) + pd.Timedelta(minutes=i) for i in range(n)])
y = np.random.rand(n)

data = pd.DataFrame(
    index=x,
    data={
        'x':np.linspace(0, 10, num=n),
        'y':np.linspace(10, 20, num=n),
        'z':np.linspace(-5, 5, num=n)
        }
    )

fig, ax = plt.subplots()
ax.plot(x, y)
manylabels.ManyLabels(ax, data)
plt.show()

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

manylabels-0.0.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

manylabels-0.0.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file manylabels-0.0.4.tar.gz.

File metadata

  • Download URL: manylabels-0.0.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for manylabels-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ad1d720e98ed218a33e263c6f62e7cbdc758bc726515d8c0f415a602312d2d66
MD5 34827c91e9f47a078902ef0b69226430
BLAKE2b-256 9efc23a952bb21f80d301cf730ee708a6c5036dc8ad2806dbdc56c33513e2bfd

See more details on using hashes here.

File details

Details for the file manylabels-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: manylabels-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for manylabels-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b9e908bdb8674de9545d72e2decfb09fd8be8fc24548c5d00fc59fca3b9d406d
MD5 f30e78ab9c48712b1bfa9224f88eb42e
BLAKE2b-256 9e1d22241803cab64eb17557f79846a0e8937867ff24cb15c391c5d1c5c04c9f

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