Metadata-Version: 2.4
Name: matplotdrip
Version: 2.0.0
Summary: Make your matplotlib dripped up.
Author-email: Tom Hilder <thomas.hilder@monash.edu>
License: MIT License
        
        Copyright (c) 2025 Thomas Hilder
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: matplotlib>=3.8
Description-Content-Type: text/markdown

# matplotdrip

<div align="center">
<img src="https://raw.githubusercontent.com/TomHilder/matplotdrip/main/examples/histogram.png" alt="histogram" width="500"></img>
</div>

Installable matplotlib style sheet, a color cycle, and some nice colormaps.

I use these settings because I think they make plots that are "good", but also (as the kids would say) "dripped up".

## Installation

Easiest is from PyPI either with `pip`

```sh
pip install matplotdrip
```

or `uv` (recommended)

```sh
uv add matplotdrip
```

Or, you can clone and build from source

```sh
git clone git@github.com:TomHilder/matplotdrip.git
cd matplotdrip
pip install -e .
```

where in the last step we made an editable install with pip but you can do whatever you like.

## Usage

To use the plotting style:

```python
import matplotdrip  # Registers the style with matplotlib

plt.style.use("drip")
```

To get a colour from the cycle by index, wrapping around if the index exceeds the number of colours:

```python
from matplotdrip import get_color
c = get_color(N) # N is any positive integer
```

To access the custom colormaps:

```python
from matplotdrip import colormaps
# Then simply use `red_white_blue` or `red_white_blue_r` in place of any mpl cmap
plt.imshow(..., cmap="red_white_blue_r")
```

## Credit

The colour cycle is from [manim](https://docs.manim.community/en/stable/reference/manim.utils.color.manim_colors.html), and the `red_white_blue` colourmap is from [this repo](https://github.com/c-white/colormaps).
