Skip to main content

Easily create and customize bump charts in Python

Project description

bumplot: easily create and customize bump charts in Python

bumplot logo

bumplot is a small Python package made to facilitate the creation of bump charts using matplotlib and Bézier curves. It has high customization capabilities too!

Bump charts are useful when the focus is on comparing relative rankings—who is ahead of whom—rather than the exact magnitude of the differences.

Check out the online documentation



Get started

import matplotlib.pyplot as plt
import pandas as pd

from bumplot import bumplot

data = pd.DataFrame(
    {
        "x": [2020, 2021, 2022, 2023],
        "A": [10, 50, 20, 80],
        "B": [40, 30, 60, 10],
        "C": [90, 20, 70, 40],
    }
)

fig, ax = plt.subplots(figsize=(8, 4))
bumplot(
    x="x",
    y_columns=["A", "B", "C"],
    data=data,
    curve_force=0.5,
    plot_kwargs={"lw": 4},
    scatter_kwargs={"s": 150, "ec": "black", "lw": 2},
    colors=["#ffbe0b", "#ff006e", "#3a86ff"],
)
ax.legend()
ax.spines[["top", "right", "left", "bottom"]].set_visible(False)
ax.grid(alpha=0.4)

See more examples



Installation

pip install bumplot



Features

  • Automatic ranking of your data (with support for both pandas and polars)
  • Accept categorical data for x-axis
  • Infinite customization capabilities
  • Easy control of the curvature intensity

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

bumplot-0.2.1.tar.gz (100.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bumplot-0.2.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file bumplot-0.2.1.tar.gz.

File metadata

  • Download URL: bumplot-0.2.1.tar.gz
  • Upload date:
  • Size: 100.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bumplot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2e395d35a2df7c0ed8595c32a960d0d6e5dfffabda751194ccf07b6581a6945a
MD5 d0218602db2243686e9f83da18a6eb80
BLAKE2b-256 228b584fa73adfa5478e827344e4b20074ed50a4af87f0499cf40e799f18b70c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumplot-0.2.1.tar.gz:

Publisher: pypi.yaml on y-sunflower/bumplot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bumplot-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bumplot-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bumplot-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e99414f2fb402bad4654bb8e31e4873d43316dcf4d067113a160b4dc8ae16b76
MD5 ced79087ab49ba2a50c71509f1a95eb6
BLAKE2b-256 1be270ac5746af9f9ce87742e0e49e53c9f1d35589aaf4a55312d60100601fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumplot-0.2.1-py3-none-any.whl:

Publisher: pypi.yaml on y-sunflower/bumplot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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