Metadata-Version: 2.4
Name: mpl-gradients
Version: 0.1.0
Summary: Gradient fills for Matplotlib charts using Agg filters
Author-email: Sanrishi <sharmasanchitrishi@mail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/sanrishi/mpl-gradients
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: matplotlib
Requires-Dist: numpy
Dynamic: license-file

# mpl-gradients

![Gradient Demo](assets/polished_demo.png)

A lightweight, zero-dependency library to add linear gradient fills to Matplotlib charts.
*Solves [matplotlib/matplotlib#30958](https://github.com/matplotlib/matplotlib/issues/30958).*

## Features
* **Vertical Gradients:** Fade from Top to Bottom.
* **Horizontal Gradients:** Fade from Left to Right.
* **Diagonal Gradients:** Fade from Corner to Corner.
* **Alpha Blending:** Correctly handles transparency.

## Installation

You can install directly from GitHub:

```bash
pip install git+[https://github.com/sanrishi/mpl-gradients.git](https://github.com/sanrishi/mpl-gradients.git)

## Quick start 
import matplotlib.pyplot as plt
from mpl_gradients import LinearGradient

fig, ax = plt.subplots()
ax.bar([0, 1, 2], [10, 20, 15])

# Create a gradient (Top-Left Navy -> Bottom-Right Lime)
gradient = LinearGradient("navy", "lime", direction="diagonal")

# Apply to bars
for bar in ax.containers[0]:
    bar.set_agg_filter(gradient)

plt.show()

## Requirements
Python 3.9+

Matplotlib

Numpy
