Metadata-Version: 2.3
Name: plotting_backends
Version: 0.1.0
Summary: Plotting dispatch backends
Project-URL: Homepage, https://github.com/GalacticDynamics/plotting_backends
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/plotting_backends/issues
Project-URL: Changelog, https://github.com/GalacticDynamics/plotting_backends/releases
Author-email: galax maintainers <nstarkman@users.noreply.github.com>, Nathaniel Starkman <nstarman@users.noreply.github.com>
License: Copyright 2024 galax maintainers
        
        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: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: pytest-cov>=3; extra == 'dev'
Requires-Dist: pytest>=6; extra == 'dev'
Requires-Dist: sybil!=7.1.0; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=3; extra == 'test'
Requires-Dist: pytest>=6; extra == 'test'
Requires-Dist: sybil!=7.1.0; extra == 'test'
Description-Content-Type: text/markdown

<h1 align='center'> plotting_backends </h1>
<h3 align="center"> plotting dispatch backends </h3>

## Installation

[![PyPI platforms][pypi-platforms]][pypi-link]
[![PyPI version][pypi-version]][pypi-link]

```bash
pip install plotting_backends
```

## Examples

### `functools.singledispatch`

This shows how to use `plotting_backends` with `functools.singledispatch`.

```python
import plotting_backends
from functools import singledispatch


@singledispatch
def plotting_func(
    backend: type[plotting_backends.AbstractPlottingBackend], x: Any, y: Any
) -> None: ...


@plotting_func.register
def matplotlib(
    backend: type[plotting_backends.MatplotlibBackend], x: Any, y: Any
) -> None: ...
```

### `plum` (multiple dispatch)

This example shows how to use `plotting_backends` in conjunction with `plum`, a
multiple dispatch library.

```python
import plotting_backends
from plum import dispatch


@dispatch.abstract
def plotting_func(
    backend: type[plotting_backends.AbstractPlottingBackend], x: Any, y: Any
) -> None: ...


@dispatch
def plotting_func(
    backend: type[plotting_backends.MatplotlibBackend], x: Any, y: Any
) -> None: ...
```

## Development

[![Actions Status][actions-badge]][actions-link]
[![ruff status][ruff-badge]][ruff-link]

We welcome contributions!

<!-- prettier-ignore-start -->

[actions-badge]:            https://github.com/GalacticDynamics/plotting_backends/workflows/CI/badge.svg
[actions-link]:             https://github.com/GalacticDynamics/plotting_backends/actions
[pypi-link]:                https://pypi.org/project/plotting_backends/
[pypi-platforms]:           https://img.shields.io/pypi/pyversions/plotting_backends
[pypi-version]:             https://img.shields.io/pypi/v/plotting_backends
[ruff-badge]:               https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
[ruff-link]:                https://github.com/astral-sh/ruff

<!-- prettier-ignore-end -->
