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:

pip install statannotcolor

You may instead want to use the development version from Github:

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 2

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.3.tar.gz (10.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: statannotcolor-0.1.3.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for statannotcolor-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ae80ceaf936c7749c7784e48d2e866b7af12930f3eecd3f5a42a9737fbc7b697
MD5 bc3d5115cb6a8a8c921ecd2b0f06fd08
BLAKE2b-256 bf5d7f4d7a91e2946f8d800c7ad49e918ad828ddff6094f015fc3bd86df7e5e8

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