Metadata-Version: 2.4
Name: matelot
Version: 0.1.0
Summary: Seaborn extension with brightness grouping and interactive annotations
Project-URL: Homepage, https://github.com/OlivierHecart/matelot
Author: Olivier Hecart
License-Expression: MIT
License-File: LICENSE
Keywords: matplotlib,plot,seaborn,visualization
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Requires-Dist: matplotlib>=3.5
Requires-Dist: pandas>=1.5
Requires-Dist: seaborn>=0.13
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Description-Content-Type: text/markdown

# Matelot: a [seaborn](https://seaborn.pydata.org/index.html) extension

## Brightness grouping

Matelot provides `lineplot` and `boxplot` functions that behave as seaborn `lineplot` and `boxplot` functions with an extra `brightness` argument:

**brightness** : *vector or key in `data`*

- Grouping variable that will produce lines with different brightness. 

Example:
```
matelot.lineplot(
    data=df,
    x="payload",
    y="msg/s",
    estimator="median",
    hue="branch",
    brightness="binary",
)
```

<img src="https://github.com/OlivierHecart/matelot/blob/main/lineplot1.svg?raw=true">

## Annotations

Matelot `lineplot` function accepts an extra `annotate` argument:

**annotate** : *bool or literal*
- Automatic annotation of lineplot points with their `y` value.

Example:
```
matelot.lineplot(
    data=df,
    x="payload",
    y="msg/s",
    estimator="median",
    annotate=True,
)
```

<img src="https://github.com/OlivierHecart/matelot/blob/main/lineplot2.svg?raw=true">

## Interactive annotations

Matelot `lineplot` function `annotate` argument accepts literal value `"interactive"` that makes annotations only appear on mouseover events.

When using the interactive annotation the matplotlib figure needs to be either:
 - turned to an interactive figure through the matelot `interactive` function.
 - saved through the matelot `savefig` function.

 Interactive annotations only work with `svg` output format.

Example:
```
fig, ax = plt.subplots()

matelot.lineplot(
    data=df,
    x="payload",
    y="msg/s",
    marker="o",
    estimator="median",
    annotate=True,
    ax=ax,
)

fig = matelot.interactive(fig)
fig.savefig("lineplot.svg")
```

Example using implicit interface:
```
matelot.lineplot(
    data=df,
    x="payload",
    y="msg/s",
    estimator="median",
    annotate=True,
)

matelot.savefig("lineplot.svg")
```

Note: to include the svg image in a web page, use an iframe:
```
<iframe src="lineplot.svg" style="border:none; width:100%; height:100vh;"></iframe>
```