https://github.com/y-sunflower/bumplot
Easily create and customize bump charts in Python
https://github.com/y-sunflower/bumplot
bump dataviz matplotlib plot
Last synced: 2 months ago
JSON representation
Easily create and customize bump charts in Python
- Host: GitHub
- URL: https://github.com/y-sunflower/bumplot
- Owner: y-sunflower
- License: mit
- Created: 2025-08-24T07:12:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-01-28T08:58:48.000Z (4 months ago)
- Last Synced: 2026-03-28T00:58:00.121Z (2 months ago)
- Topics: bump, dataviz, matplotlib, plot
- Language: Python
- Homepage: https://y-sunflower.github.io/bumplot/
- Size: 870 KB
- Stars: 73
- Watchers: 0
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# `bumplot`: easily create and customize bump charts in Python

`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](https://y-sunflower.github.io/bumplot/)
## Get started
```python
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](https://y-sunflower.github.io/bumplot/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