Skip to main content

lazy-visual

CI PyPI License: MIT Python 3.10–3.13

One-line statistical plots with built-in stats.

import lazy_visual as lv
lv.raincloud(df, x="group", y="score", save="fig.svg")

Returns a figure and statistics (p-value, Cohen's d, AUC with CI) in a single LvResult.

Install

pip install lazy-visual

Python 3.10–3.13. Optional extras: pip install "lazy-visual[parquet]" or "lazy-visual[excel]".

Example 1 - raincloud with p-value and Cohen's d

import numpy as np
import pandas as pd
import lazy_visual as lv

rng = np.random.default_rng(0)
df = pd.DataFrame({
    "group": rng.choice(["control", "drug_a", "drug_b"], 300),
    "score": rng.normal(0, 1, 300) + rng.choice([0, 1, 2], 300),
})

lv.raincloud(
    df, x="group", y="score",
    pairs=[("control", "drug_a"), ("control", "drug_b")],
    save="raincloud.svg",
)

Result: half-violin + box + jittered points, plus p-value and Cohen's d brackets above the groups.

Example 2 - ROC curves with DeLong CI

rng = np.random.default_rng(1)
n = 200
y = rng.choice([0, 1], n)
df_roc = pd.DataFrame({
    "y_true": y,
    "model_a": y * 1.5 + rng.normal(0, 1.0, n),
    "model_b": y * 1.0 + rng.normal(0, 1.2, n),
})

lv.roc(
    df_roc, y_true="y_true", y_score=["model_a", "model_b"],
    ci_method="delong", save="roc.svg",
)

Result: ROC curves with AUC and 95% DeLong CI shown in the legend.

Example 3 - UpSet for set intersections

lv.upset(
    {"A": {1, 2, 3, 4, 5},
     "B": {3, 4, 5, 6},
     "C": {4, 5, 6, 7}},
    save="upset.svg",
)

Result: three-panel UpSet plot (bars, matrix, sets) plus LvResult.tables["intersections"] with exclusive intersection sizes.

What's in the box

  • 8 plots: scatterplot, distribution, box, violin, raincloud, heatmap, upset, roc
  • Built-in stats: Mann-Whitney U, Welch t-test, Kruskal-Wallis, Holm correction, Cohen's d, DeLong & bootstrap AUC CI
  • 4 themes: default, nature, apa, dark
  • Export: PNG / SVG / PDF (atomic writes)
  • lv.load(): CSV, TSV, Parquet, Excel, JSON, HTTP(S) URL
  • Only 4 dependencies: numpy, scipy, pandas, matplotlib. MIT licensed.

Demo notebook

Open in Colab

Documentation

Development

git clone https://github.com/TatianaIl05/lazy-visual.git
cd lazy-visual
pip install -e ".[dev]"
pytest -q

Metadata

Release files for lazy-visual 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lazy-visual 0.1.3
File Size Uploaded Provenance Actions
lazy_visual-0.1.3.tar.gz 741.7 kB Without provenance Details for lazy_visual-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lazy-visual 0.1.3
File Interpreter ABI Platform Actions
lazy_visual-0.1.3-py3-none-any.whl Python 3 none any Details for lazy_visual-0.1.3-py3-none-any.whl

Total release size: 777.3 kB

Release files / lazy_visual-0.1.3.tar.gz

Download URL lazy_visual-0.1.3.tar.gz
Size 741.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2aa6290cdacd021bd5143ee698f1891f7a31c70f7b29e2d4c414f6f48a2c8a3b
BLAKE2b-256 checksum
How to use checksums
8964b60b07f48629b33a6918967d5800984e133af3a20cf53d73d79870f7263d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / lazy_visual-0.1.3-py3-none-any.whl

Download URL lazy_visual-0.1.3-py3-none-any.whl
Size 35.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32d32816d4ef6dda965e1f9681ed9176b9fc9a42edd3a4217f29abe11acbd088
BLAKE2b-256 checksum
How to use checksums
3791a379b8b78c2066b3378c8337e25182b443f7ea7befc1ee6ba9596f9fc395
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for lazy-visual 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page