ridgeplot-py
This is a simple module for plotting ridgeplot with the scipy ecosystem.
Ridgeplot is a great data visualization technique to compare distributions from multiple groups at the same time, and was first introduced in 2017 as joy plot:
I hereby propose that we call these "joy plots" #rstats https://t.co/uuLGpQLAwY
— Jenny Bryan (@JennyBryan) April 25, 2017
ridgeplot-py provides a simple API to produce matplotlib-compatible ridgeplots, as well as a handy ColorEncoder class with scikit-learn syntax for manipulating color annotations in a consistent way [through out manuscripts or presentations].
Install
git clone git@github.com:wckdouglas/ridgeplot-py.git
cd ridgeplot-py
python setup.py install
or via conda:
conda install -c conda-forge ridgeplot-py
or via pypi:
pip install ridgeplot-py
Usage
from ridgeplot import ridgeplot
from ridgeplot.colors import ColorEncoder, ColorPalette
import numpy as np
import matplotlib.pyplot as plt
# mocking some data
# the input data should be a dict of
# - keys: group names for the distributions
# - values: list of values
data = {}
for i in range(8):
data['data_{}'.format(i)] = np.random.randn(100) * (i+1)
# make the plot
fig = plt.figure()
ax = fig.add_subplot(111)
ridgeplot(
ax,
data,
xlim=(-20,20),
label_size=15
)
Example
A notebook showing quick howto is included in this repo!
Release files for ridgeplot-py 0.2.0.post10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ridgeplot_py-0.2.0.post10.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ridgeplot_py-0.2.0.post10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.4 kB
Release files / ridgeplot_py-0.2.0.post10.tar.gz
| Download URL | ridgeplot_py-0.2.0.post10.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2df814eb299b463998e88a80fbd74d62280b1c15a057a1731978918a96d12411
|
|
BLAKE2b-256 checksum How to use checksums |
8eb4916444e3a9fda0608eef7da850d4c11159bb559b04533b2629093776d420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.13 Darwin/22.5.0
|
Release files / ridgeplot_py-0.2.0.post10-py3-none-any.whl
| Download URL | ridgeplot_py-0.2.0.post10-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a05f277cd7eda0434c5cd07835964bd85ee5c2a7402f353647cde680ffa25a03
|
|
BLAKE2b-256 checksum How to use checksums |
3f5c56feeee4f3ab0ef55115db5c656d301fd145f65f546215445f2f915064df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.13 Darwin/22.5.0
|