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],
    }
)
x = "x"
y_columns = ["A", "B", "C"]

fig, ax = plt.subplots(figsize=(8, 4))
bumplot(
    x=x,
    y_columns=y_columns,
    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

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.1.0.tar.gz (51.4 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.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bumplot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7c62fb08476c068b81a7f5851aec77c64e0fb61e704d3c35b24b11ce22aa4fa
MD5 a1885eb44b09c6c1651a99e8c4998239
BLAKE2b-256 7285755014590f011d107dec566e541a0bd14de4faf2abed1536cd474a7818a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumplot-0.1.0.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.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for bumplot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88d8f1104ae25c6b31e1895ce75fb2235d8483db64977ef0265a611b6fca0cfe
MD5 d9679339915d01c71d4ab4554bf66efa
BLAKE2b-256 6318827ee431a839a1bd14de4f37dfd181764e894d562e37aa36249a167c2930

See more details on using hashes here.

Provenance

The following attestation bundles were made for bumplot-0.1.0-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