Metadata-Version: 2.4
Name: p9customtheme
Version: 0.1.3
Summary: My personal plotnine theme package.
Author-email: Paul Saary <github@paulsaary.de>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/openpaul/p9customtheme
Project-URL: Changelog, https://github.com/openpaul/p9customtheme/releases
Project-URL: Issues, https://github.com/openpaul/p9customtheme/issues
Project-URL: CI, https://github.com/openpaul/p9customtheme/actions
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: plotnine<1.0.0,>=0.15.0
Requires-Dist: polars<2.0.0,>=1.0.0
Requires-Dist: pandas<4.0.0,>=2.0.0
Requires-Dist: pyarrow
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: polars; extra == "test"
Requires-Dist: pyarrow; extra == "test"
Requires-Dist: ruff; extra == "test"
Dynamic: license-file

# p9customtheme

My personal plotnine theme package.
You can use it but changes to the theme will appear with minimal versioning.

If you want a reproducible experience make sure to pin the version in your dependency.

[Plotnine](https://github.com/has2k1/plotnine) is awesome and a big thanks to the developers for making it.

## Installation

Install this theme using `pip` ur `uv`:

```bash
uv pip install p9customtheme
```

## Usage

You can simply install the package. Once you import it the theme is set as the default:

```python
import p9customtheme
```

That is all you need.

Here is a more complete example showing also the color scale option:

```python
from p9customtheme import custom_discrete, custom_theme
import plotnine as p9
from plotnine.data import penguins

(
    p9.ggplot(penguins, p9.aes("species", "bill_length_mm", fill="island"))
    + p9.geom_boxplot()
    + custom_discrete()
    + p9.labs(
        title="Penguin bill length by species and island".title(),
        subtitle="A comparison based on example data",
        x="species",
        y="bill length [mm]",
        fill="Island",
    )
)
```

![A boxplot with the custom theme](./tests/baseline/boxplot_simple.png "Penguin Boxplot")

## Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

```bash
cd p9customtheme
uv venv
source ./venv/bin/activate
```

Now install the dependencies and test dependencies:

```bash
uv pip install -e '.[test]'
```

Before any PR ensure the tests as passing with:

```bash
pytest .
```
