Metadata-Version: 2.4
Name: matplotlib-dark
Version: 0.1.0
Summary: Automatic dark themes for Matplotlib, with one-line activation
Author-email: "Eduardo J. Barrios" <edujbarrios@outlook.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/edujbarrios/matplotlib-dark
Project-URL: Documentation, https://github.com/edujbarrios/matplotlib-dark#readme
Project-URL: Repository, https://github.com/edujbarrios/matplotlib-dark
Project-URL: Issues, https://github.com/edujbarrios/matplotlib-dark/issues
Project-URL: Changelog, https://github.com/edujbarrios/matplotlib-dark/blob/main/CHANGELOG.md
Keywords: matplotlib,dark-mode,visualization,plotting,theme
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib>=3.5.0
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: dev
Requires-Dist: build>=1; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Dynamic: license-file

<div align="center">

# matplotlib-dark

**Automatic dark mode for Matplotlib — polished charts without designing a theme.**

[![CI](https://github.com/edujbarrios/matplotlib-dark/actions/workflows/ci.yml/badge.svg)](https://github.com/edujbarrios/matplotlib-dark/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/matplotlib-dark)](https://pypi.org/project/matplotlib-dark/)
[![Python](https://img.shields.io/pypi/pyversions/matplotlib-dark)](https://pypi.org/project/matplotlib-dark/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

</div>

`matplotlib-dark` is the automatic alternative to hand-picking backgrounds,
grid colors, text contrast, and line palettes for every chart. Activate it in
one line, then keep using the Matplotlib API you already know.

![Six matplotlib-dark themes compared](https://raw.githubusercontent.com/edujbarrios/matplotlib-dark/main/images/theme_comparison.png)

## Installation

```bash
python -m pip install matplotlib-dark
```

Python 3.9+ and Matplotlib 3.5+ are supported.

## Quick start

```python
import matplotlib.pyplot as plt
import matplotlib_dark as mdk

mdk.dark_mode()  # That's it: every following chart uses dark mode.

plt.plot([1, 2, 3, 4], [1, 4, 2, 3])
plt.title("Ready for the dark")
plt.show()
```

No custom CSS, manual color selection, or complex design code is required.

## Choose a theme

```python
mdk.dark_mode("nord")
```

Six ready-to-use themes are included: `default`, `nord`, `monokai`,
`dracula`, `neon`, and `material`.

```python
print(mdk.get_available_themes())
```

## Apply dark mode temporarily

Use the context manager when only some charts should be dark. Your previous
Matplotlib configuration is restored automatically, even if plotting fails.

```python
with mdk.dark_theme("dracula"):
    plt.plot([1, 2, 3], [3, 1, 4])
    plt.savefig("dark-chart.png")
```

For global mode, restore your original configuration explicitly:

```python
mdk.dark_mode("material")
# Create charts...
mdk.light_mode()
```

## Why matplotlib-dark?

- One-line automatic dark mode
- Six coordinated color palettes
- Works with the complete Matplotlib API
- Global mode or safe, temporary context manager
- Dark backgrounds are preserved when saving figures
- Zero dependencies beyond Matplotlib

## Development

```bash
git clone https://github.com/edujbarrios/matplotlib-dark.git
cd matplotlib-dark
python -m pip install -e ".[dev]"
python -m pytest
python -m build
python -m twine check dist/*
```

## License

MIT © Eduardo J. Barrios
