Skip to main content

add color to statannot

Project description

# 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statannotcolor-0.1.2.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file statannotcolor-0.1.2.tar.gz.

File metadata

  • Download URL: statannotcolor-0.1.2.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/2.7.13

File hashes

Hashes for statannotcolor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ecdfa57e234cb9114a9ed3f45faa06d09791d5c59992142abeef68170538c30b
MD5 6d1d726b0f74182513aa7f611f5a592b
BLAKE2b-256 7471c4550b61563a50208b2c441bce1d3c692ead27f715a90d2215fa11778288

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page