# Disclaimer

This repository is based on webermarcolivier/statannot (commit 1835078 of Feb 21, 2020, tagged "v0.2.3"). Another version available can be found in https://github.com/trevismd/statannotations

Additions/modifications since that version are below represented in bold (previous fixes are not listed).

## What is it

Python package to optionnally compute statistical test and add statistical annotations on an existing boxplot/barplot generated by seaborn. We constantly add new features including customized colors, locations, etc.

## Features

- Single function to add statistical annotations on an existing boxplot/barplot generated by seaborn boxplot.
- Integrated statistical tests (binding to `scipy.stats` methods):
    - Mann-Whitney
    - t-test (independent and paired)
    - Welch's t-test
    - Levene test
    - Wilcoxon test
    - Kruskal-Wallis test
- Smart layout of multiple annotations with correct y offsets.
- Annotations can be located inside or outside the plot.
- Format of the statistical test annotation can be customized: star annotation, simplified p-value, or explicit p-value.
- Optionally, custom p-values can be given as input. In this case, no statistical test is performed.

## Installation

The latest stable release can be installed from PyPI:

```python
pip install statannotcolor
```
You may instead want to use the development version from Github:

```python
pip install ttps://github.com/XianchengLI/statannotcolor.git
```

## Documentation

See example jupyter notebook `example/example.ipynb`.

## Usage

Here is a minimal example:





More examples are available in the jupyter notebook `example/example.ipynb`.


## Examples

![Example 1](/example/example_non-hue_outside.png)

![Example 2](/example/example_hue_layout.png)

## Requirements

+ Python >= 3.5
+ numpy >= 1.12.1
+ seaborn >= 0.8.1
+ matplotlib >= 2.2.2
+ pandas >= 0.23.0
+ scipy >= 1.1.0

## Cite

A Digital Object Identifiers (DOIs) was created for the repository for easier referencing in the academic literature.
