#  Peepomap
Just some extra Peepo-Powered Matplotlib colormaps and tools.
## 📦 Installation
### Basic installation
```bash
pip install peepomap
```
### Optional dependencies
Peepomap includes optional features that require additional packages:
```bash
# Xarray integration for seamless data plotting
pip install peepomap[xarray]
# Interactive widgets for Jupyter notebooks
pip install peepomap[interactive]
# Install all optional dependencies
pip install peepomap[all]
```
### Using uv (recommended for development)
```bash
uv pip install peepomap
# Or with extras
uv pip install "peepomap[all]"
```
## 🎨 Colormaps
```python
import peepomap
peepomap.tools.display_colormaps(pepomap.cmaps)
```


## 💻 How to use
Simple import and choose a colormap from the above list by it`s name.
```python
import peepomap
cmap = peepomap.cmaps["storm"]
# or get a colormap
storm = peepomap.get("storm")
# Also works with matplotlib colormaps
viridis = peepomap.get("viridis")
```
## 🛠️ Colormap Tools
Peepomap provides powerful tools to create, modify, and combine colormaps.
### Combine Colormaps
Blend two or more colormaps together with custom weights:
```python
import peepomap
blues = peepomap.get("Blues")
reds = peepomap.get("Reds")
combined_cmap = peepomap.combine(blues, reds, weights=[0.4, 0.6], name="Wines")
```


### Create Linear Colormaps
Create smooth linear gradients between colors:
```python
import peepomap
ocean_sunset = peepomap.create_linear("navy", "crimson", name="Ocean Sunset")
```


### Create Diverging Colormaps
Build diverging colormaps with optional center colors and diffusion:
```python
import peepomap
# Simple diverging colormap
cool_warm = peepomap.create_diverging("Blues_r", "Reds", name="Cool Warm")
# Diverging with custom center color and diffusion
rdylbl = peepomap.create_diverging(
"Reds_r", "Blues", center="yellow", diffusion=0.3, name="RdYlBl"
)
```


### Concatenate Colormaps
Join multiple colormaps end-to-end with optional blending:
```python
import peepomap
div1 = peepomap.create_diverging("Blues_r", "Reds", diffusion=0.3, name="div1")
div2 = peepomap.create_diverging("Purples_r", "Oranges", diffusion=0.3, name="div2")
combined = peepomap.concat(div1, div2, diffusion=0.5, n=512, name="Fusion")
```


You can even concatenate very different types of colormaps:
```python
import peepomap
sunset = peepomap.create_linear("gold", "orangered", name="Sunset", reverse=True)
tab20b = peepomap.get("tab20b")
odd = peepomap.concat(sunset, tab20b, diffusion=0.5, name="Odd1")
```


### Adjust Colormaps
Fine-tune existing colormaps by adjusting saturation, lightness, or color channels:
```python
import peepomap
original = peepomap.get("storm")
saturated = peepomap.adjust("storm", saturation=1.8, cmap_name="Storm Saturated")
desaturated = peepomap.adjust("storm", saturation=0.3, cmap_name="Storm Desaturated")
brighter = peepomap.adjust("storm", lightness=1.4, cmap_name="Storm Brighter")
blue_boosted = peepomap.adjust("storm", blue_boost=0.3, cmap_name="Storm Blue Boost")
```


### Truncate Colormaps
Extract a portion of a colormap:
```python
import peepomap
original = peepomap.get("vapor")
first_half = peepomap.truncate("vapor", 0.0, 0.5, cmap_name="Vapor First Half")
second_half = peepomap.truncate("vapor", 0.5, 1.0, cmap_name="Vapor Second Half")
middle = peepomap.truncate("vapor", 0.25, 0.75, cmap_name="Vapor Middle")
```


### Shift Colormaps
Rotate a colormap by shifting its starting point:
```python
import peepomap
original = peepomap.get("hsv")
shift_25 = peepomap.shift("hsv", start=0.25, cmap_name="HSV Shift 0.25")
shift_50 = peepomap.shift("hsv", start=0.5, cmap_name="HSV Shift 0.50")
shift_75 = peepomap.shift("hsv", start=0.75, cmap_name="HSV Shift 0.75")
```


## 🏗️ Development
This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
### Setup
```bash
uv sync --all-extras
```
### Running Tools
The project includes a Makefile for common tasks:
```bash
# See all available commands
make help
# Install development dependencies
make dev
# Format code
make format
# Lint code
make lint
# Type check
make type-check
# Generate colormap demo images
make demo
# Run all checks
make check
```
Raw data
{
"_id": null,
"home_page": null,
"name": "peepomap",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "cartopy, colormap, matplotlib, scientific computing, visualization",
"author": null,
"author_email": "Eric Miguel <eric.mrib@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/9d/71/5d99f4c39f3b506cc0fef4e953319d5286c12aaebc268142756b19159354/peepomap-0.2.0.tar.gz",
"platform": null,
"description": "#  Peepomap\n\nJust some extra Peepo-Powered Matplotlib colormaps and tools.\n\n## \ud83d\udce6 Installation\n\n### Basic installation\n\n```bash\npip install peepomap\n```\n\n### Optional dependencies\n\nPeepomap includes optional features that require additional packages:\n\n```bash\n# Xarray integration for seamless data plotting\npip install peepomap[xarray]\n\n# Interactive widgets for Jupyter notebooks\npip install peepomap[interactive]\n\n# Install all optional dependencies\npip install peepomap[all]\n```\n\n### Using uv (recommended for development)\n\n```bash\nuv pip install peepomap\n# Or with extras\nuv pip install \"peepomap[all]\"\n```\n\n## \ud83c\udfa8 Colormaps\n\n```python\nimport peepomap\n\npeepomap.tools.display_colormaps(pepomap.cmaps)\n```\n\n\n\n\n\n## \ud83d\udcbb How to use\n\nSimple import and choose a colormap from the above list by it`s name.\n\n```python\nimport peepomap\n\ncmap = peepomap.cmaps[\"storm\"]\n# or get a colormap\nstorm = peepomap.get(\"storm\")\n# Also works with matplotlib colormaps\nviridis = peepomap.get(\"viridis\")\n```\n\n## \ud83d\udee0\ufe0f Colormap Tools\n\nPeepomap provides powerful tools to create, modify, and combine colormaps.\n\n### Combine Colormaps\n\nBlend two or more colormaps together with custom weights:\n\n```python\nimport peepomap\n\nblues = peepomap.get(\"Blues\")\nreds = peepomap.get(\"Reds\")\ncombined_cmap = peepomap.combine(blues, reds, weights=[0.4, 0.6], name=\"Wines\")\n```\n\n\n\n\n### Create Linear Colormaps\n\nCreate smooth linear gradients between colors:\n\n```python\nimport peepomap\n\nocean_sunset = peepomap.create_linear(\"navy\", \"crimson\", name=\"Ocean Sunset\")\n```\n\n\n\n\n### Create Diverging Colormaps\n\nBuild diverging colormaps with optional center colors and diffusion:\n\n```python\nimport peepomap\n\n# Simple diverging colormap\ncool_warm = peepomap.create_diverging(\"Blues_r\", \"Reds\", name=\"Cool Warm\")\n\n# Diverging with custom center color and diffusion\nrdylbl = peepomap.create_diverging(\n \"Reds_r\", \"Blues\", center=\"yellow\", diffusion=0.3, name=\"RdYlBl\"\n)\n```\n\n\n\n\n### Concatenate Colormaps\n\nJoin multiple colormaps end-to-end with optional blending:\n\n```python\nimport peepomap\n\ndiv1 = peepomap.create_diverging(\"Blues_r\", \"Reds\", diffusion=0.3, name=\"div1\")\ndiv2 = peepomap.create_diverging(\"Purples_r\", \"Oranges\", diffusion=0.3, name=\"div2\")\ncombined = peepomap.concat(div1, div2, diffusion=0.5, n=512, name=\"Fusion\")\n```\n\n\n\n\nYou can even concatenate very different types of colormaps:\n\n```python\nimport peepomap\n\nsunset = peepomap.create_linear(\"gold\", \"orangered\", name=\"Sunset\", reverse=True)\ntab20b = peepomap.get(\"tab20b\")\nodd = peepomap.concat(sunset, tab20b, diffusion=0.5, name=\"Odd1\")\n```\n\n\n\n\n### Adjust Colormaps\n\nFine-tune existing colormaps by adjusting saturation, lightness, or color channels:\n\n```python\nimport peepomap\n\noriginal = peepomap.get(\"storm\")\nsaturated = peepomap.adjust(\"storm\", saturation=1.8, cmap_name=\"Storm Saturated\")\ndesaturated = peepomap.adjust(\"storm\", saturation=0.3, cmap_name=\"Storm Desaturated\")\nbrighter = peepomap.adjust(\"storm\", lightness=1.4, cmap_name=\"Storm Brighter\")\nblue_boosted = peepomap.adjust(\"storm\", blue_boost=0.3, cmap_name=\"Storm Blue Boost\")\n```\n\n\n\n\n### Truncate Colormaps\n\nExtract a portion of a colormap:\n\n```python\nimport peepomap\n\noriginal = peepomap.get(\"vapor\")\nfirst_half = peepomap.truncate(\"vapor\", 0.0, 0.5, cmap_name=\"Vapor First Half\")\nsecond_half = peepomap.truncate(\"vapor\", 0.5, 1.0, cmap_name=\"Vapor Second Half\")\nmiddle = peepomap.truncate(\"vapor\", 0.25, 0.75, cmap_name=\"Vapor Middle\")\n```\n\n\n\n\n### Shift Colormaps\n\nRotate a colormap by shifting its starting point:\n\n```python\nimport peepomap\n\noriginal = peepomap.get(\"hsv\")\nshift_25 = peepomap.shift(\"hsv\", start=0.25, cmap_name=\"HSV Shift 0.25\")\nshift_50 = peepomap.shift(\"hsv\", start=0.5, cmap_name=\"HSV Shift 0.50\")\nshift_75 = peepomap.shift(\"hsv\", start=0.75, cmap_name=\"HSV Shift 0.75\")\n```\n\n\n\n\n## \ud83c\udfd7\ufe0f Development\n\nThis project uses [uv](https://docs.astral.sh/uv/) for dependency management.\n\n### Setup\n\n```bash\nuv sync --all-extras\n```\n\n### Running Tools\n\nThe project includes a Makefile for common tasks:\n\n```bash\n# See all available commands\nmake help\n\n# Install development dependencies\nmake dev\n\n# Format code\nmake format\n\n# Lint code\nmake lint\n\n# Type check\nmake type-check\n\n# Generate colormap demo images\nmake demo\n\n# Run all checks\nmake check\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Just some extra Peepo-Powered Matplotlib colormaps and tools.",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/opteric/peepomap",
"Issues": "https://github.com/opteric/peepomap/issues",
"Repository": "https://github.com/opteric/peepomap"
},
"split_keywords": [
"cartopy",
" colormap",
" matplotlib",
" scientific computing",
" visualization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9d06a7618b0d274eed7efc5e0630586f19eac4add75a045a955cf7d54472049a",
"md5": "e2c6b60ed31154de84ffc91908b10617",
"sha256": "906b6891d664fb6366184d9b36666bdc530430526d58f7f0f7e060696483d8e0"
},
"downloads": -1,
"filename": "peepomap-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e2c6b60ed31154de84ffc91908b10617",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 18218,
"upload_time": "2025-10-21T18:51:22",
"upload_time_iso_8601": "2025-10-21T18:51:22.687757Z",
"url": "https://files.pythonhosted.org/packages/9d/06/a7618b0d274eed7efc5e0630586f19eac4add75a045a955cf7d54472049a/peepomap-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9d715d99f4c39f3b506cc0fef4e953319d5286c12aaebc268142756b19159354",
"md5": "144418bddfe01c6470532147bb793af9",
"sha256": "fc15ccd02d9ef9d37f59cdf47fc17ef6a235c9365a2bf0b63bd8ac2e9fd55993"
},
"downloads": -1,
"filename": "peepomap-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "144418bddfe01c6470532147bb793af9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 164784,
"upload_time": "2025-10-21T18:51:24",
"upload_time_iso_8601": "2025-10-21T18:51:24.262965Z",
"url": "https://files.pythonhosted.org/packages/9d/71/5d99f4c39f3b506cc0fef4e953319d5286c12aaebc268142756b19159354/peepomap-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-21 18:51:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "opteric",
"github_project": "peepomap",
"github_not_found": true,
"lcname": "peepomap"
}