Skip to main content

Beautiful color and plotting utilities for matplotlib and plotly.

PyPI version Python versions Documentation Status License

plotfair provides curated color palettes, perceptually uniform colormaps, and convenient wrappers to create publication-quality figures with consistent styling across matplotlib, plotly, and interplot backends.

Features

  • PaintKit Color System - Curated color swatches with filtering by saturation (bright, dark, muted) and color family. Includes the Flexoki color scheme.

  • Perceptual Colormaps - Create colormaps that are perceptually uniform using CIECAM02 color space, ensuring smooth gradients for data visualization.

  • Matplotlib Presets - Publication-ready defaults with enhanced DPI, clean styling, and automatic figure saving to organized folders.

  • Plotly Wrapper - Matplotlib-like interface for Plotly via the Plty class.

  • Interplot Integration - Pre-configured settings for interplot with matplotlib-style plotting via the Iplt class.

Installation

pip install plotfair

Quick Start

import plotfair as pf
import matplotlib as mpl

# Set a color scheme
scheme = pf.paintkit.filter(tags={'dark'}).ordered_swatches(pf.full_rainbow)
mpl.rcParams['axes.prop_cycle'] = scheme.to_cycler()

# Create a perceptual colormap
colors = [s.hex for s in pf.paintkit.ordered_swatches(['blue', 'pink', 'orange']).colors]
cmap = pf.colormaps.perceptual_colormap_nonuniform(colors, [0.0, 0.5, 1.0])
pf.show_colormap(cmap, name='Custom Colormap')

Color Schemes

Filter colors by saturation (bright, dark, muted) or color family:

bright = pf.paintkit.filter(tags={'bright'})
blues = pf.paintkit.filter(tags={'blue'})
flexoki = pf.paintkit.filter(tags={'flexoki'})

Use predefined orderings:

# Available: pf.rainbow, pf.full_rainbow, pf.tab10, pf.flexoki
scheme = pf.paintkit.filter(tags={'bright'}).ordered_swatches(pf.tab10)

Plotly Wrapper

from plotfair import Plty
import numpy as np

plty = Plty()
x = np.linspace(0, 10, 100)

plty.plot(x, np.sin(x), label='sin(x)')
plty.xlabel('x')
plty.ylabel('y')
plty.show()

Documentation

Full documentation is available at plotfair.readthedocs.io.

Requirements

  • Python 3.9+

  • matplotlib

  • numpy

  • colorspacious

  • plotly >= 6.5.2

  • interplot >= 1.1.1

License

MIT License. See LICENSE for details.

Flexoki color scheme © Stephen Ango, licensed under the MIT License.

Metadata

Release files for plotfair 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 plotfair 0.1.0
File Size Uploaded
plotfair-0.1.0.tar.gz 16.2 kB Details

Built distribution (wheel)

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

Total release size: 36.0 kB

Release files / plotfair-0.1.0.tar.gz

Download URL plotfair-0.1.0.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3b71d606fb37e1a423a85a1c178bcd9b8918a0b92bafeca13238516989b57d43
BLAKE2b-256 checksum
How to use checksums
5724831ebed1c1f2da496762037f6b60200726b7bae0212a174602afb1b39680
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 1, 2026.

Transparency log

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

Download URL plotfair-0.1.0-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
486dab5a9a504e649804df93d12ec90de16d014910972edba6373f2679b2ffe2
BLAKE2b-256 checksum
How to use checksums
bd49289a2c22272f4eb51aaa0637110e1f0c539e9dcdad4e67ec44f86d8867ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 1, 2026.

Transparency log

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