Skip to main content

VSUP: Value-Suppressing Uncertainty Palettes

A Python package for visualizing data with uncertainty using Value-Suppressing Uncertainty Palettes (VSUPs). Inspired by https://github.com/uwdata/vsup.

Installation

Coming soon...

Development

The project is developed with uv.

To check for a local python environment, run:

uv run python

Also install the pre-commit hooks with:

uv tool install pre-commit
pre-commit install

Usage

from vsup import VSUP
import numpy as np
import matplotlib.pyplot as plt

# Create a grid of values and uncertainties for better visualization
n_points = 50
step = 1/n_points
values = np.linspace(step/2, 1-step/2, n_points)
uncertainties = np.linspace(step/2, 1-step/2, n_points)

# Create a 2D grid
values, uncertainties = np.meshgrid(values, uncertainties)

# Colorize the data
axs = plt.subplots(3, 3, figsize=(9, 9))[1]

for row, quantization in zip(axs, [None, 'linear','tree']):
    for ax, mode in zip(row, ["us", "ul", "usl"]):

        vsup = VSUP(palette='flare', mode=mode, quantization=quantization)

        colors = vsup(values, uncertainties)
        ax.pcolormesh(values, uncertainties, colors)
        # ax.set_title(f"{mode}")  #\n({description})")
        ax.set_xlabel("Value")
        ax.set_ylabel("Uncertainty")

flare example

Features

  • Three visualization modes:
    • USL: Uncertainty mapped to Saturation (chroma) and Lightness
    • US: Uncertainty mapped to Saturation
    • UL: Uncertainty mapped to Lightness
  • Two quantization mods:
    • Linear: independent binning of values and uncertainties
    • Tree: value bins depend on uncertainty bin: lower uncertainty, higher value resolution
  • Support for any matplotlib and seaborn colormaps

Citation

If you use this package in your research, please cite the original VSUP paper:

@inproceedings{2018-uncertainty-palettes,
 title = {Value-Suppressing Uncertainty Palettes},
 author = {Michael Correll AND Dominik Moritz AND Jeffrey Heer},
 booktitle = {ACM Human Factors in Computing Systems (CHI)},
 year = {2018},
 url = {http://idl.cs.washington.edu/papers/uncertainty-palettes},
}

License

MIT License

Metadata

Release files for vsup 0.1.0

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

Source distribution (sdist)

Source distribution for vsup 0.1.0
File Size Uploaded
vsup-0.1.0.tar.gz 589.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vsup 0.1.0
File Interpreter ABI Platform
vsup-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 600.5 kB

Release files / vsup-0.1.0.tar.gz

Download URL vsup-0.1.0.tar.gz
Size 589.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f0e8f9207682e2d2044b78680b8fd2394f8f94a5d1f8cccd6aee796672df88a3
BLAKE2b-256 checksum
How to use checksums
ee272dabe26cbaf61932d79e10b814ff10f5051bf49c5c4ccd00094e68c3a642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.8

Release files / vsup-0.1.0-py3-none-any.whl

Download URL vsup-0.1.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b13c0d9f009c4b3ca9599c52208166cc859525eed950bc058459ba5fd53a6925
BLAKE2b-256 checksum
How to use checksums
61675c668a2ad64490027eaef0ec5f73f13a89ca7a65df66d04fa922342e2bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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