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.1.1.tar.gz (94.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.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bumplot-0.1.1.tar.gz
  • Upload date:
  • Size: 94.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.1.1.tar.gz
Algorithm Hash digest
SHA256 d93d22b4db12ce1b7ab698339735f0584886949336f94fe2d61e8d3eb1bb6342
MD5 49e5deaef809cd100af8f443d45b5cef
BLAKE2b-256 578949b3af82cc56826c77d055dcac376c1211741a3e54dd2a300b1c0a90f6ac

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: bumplot-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a439111b701cb0452c2bd468a74257b0ebb9c4853a1b588520a72fef79920353
MD5 c6f62ba074ada5a1abe7510afa4f0e8c
BLAKE2b-256 4a94f46996f5ab5cadca9429eb9d491ad2ab5011caec59c7566eab69b6b7f6b9

See more details on using hashes here.

Provenance

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