Metadata-Version: 2.1
Name: matplotlib-colors
Version: 1.0.16
Summary: A collection of curated color profiles for matplotlib.
Home-page: https://github.com/tom-draper/matplotlib-colors
Author: Tom Draper
Author-email: Tom Draper <tomjdraper1@gmail.com>
License: MIT License
        
        Copyright (c) 2022 Tom Draper
        
        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.
Project-URL: repository, https://github.com/tom-draper/matplotlib-colors
Keywords: visualization,color,colormap,colorset,matplotlib
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: build
Provides-Extra: dev
License-File: LICENSE

# Matplotlib Colors

A collection of curated colors and colormaps for matplotlib.

<p align="center">
	<img src="https://user-images.githubusercontent.com/41476809/200025127-1d4367cd-4ace-44fd-8a50-8af938b828f8.png">
</p>

## Installation

```bash
pip install matplotlib-colors
```

## Demo

[All colors and colormaps](matplotlib_colors/README.md)

## Examples

### Colormaps

Call the `register_cmaps` function to add the new colormaps to matplotlib. Then the desired colormap can be specified by name as the `cmap` argument.

```py
from matplotlib_colors import register_cmaps
register_cmaps()  # Adds new colormaps to matplotlib

# Build your data viz as normal with matplotlib
import numpy as np
import matplotlib.pyplot as plt

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=range(12), cmap='analyst')  # Specify one of the new colormap names
plt.colorbar()
plt.show()
```

Alternatively, all new colormap objects can be accessed directly by importing the `colormaps` dict and specifying a colormap by name.

```py
import numpy as np
import matplotlib.pyplot as plt
from matplotlib_colors import colormaps

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=range(12), cmap=colormaps['analyst'])  # Specify a colormap from colormaps dict
plt.colorbar()
plt.show()
```

The full list of colormap names can be found by importing the `colormap_names` list.

```py
from matplotlib_colors import colormap_names
```

### Colors

The package includes a large selection of colors that can be accessed directly by importing `colors` and specifying a color name.

```py
import matplotlib.pyplot as plt
from matplotlib_colors import colors

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [x * x for x in x]
plt.scatter(x, y, c=colors['PL_RED'])  # All points colored with PL_RED
plt.colorbar()
plt.show()
```

The full list of color names can be found by importing the `color_names` list.

```py
from matplotlib_colors import color_names
```

