Skip to main content

Four matplotlib charts styled like a Christopher Nolan film, in the palette of the Odyssey.

Project description

odyssey-viz

Four matplotlib charts that share one house style: the visual language of a Christopher Nolan film, in the palette of the Odyssey.

Install name is odyssey-viz-armand (hyphens, for pip). Import name is odyssey_viz (underscores, for Python).

Install

pip install odyssey-viz-armand

Or, working from a clone of this repo:

python -m pip install -e .

Use

import odyssey_viz as ov

ov.use_theme()                  # apply the style to matplotlib
df = ov.sample_box_office()     # every film Nolan has directed

ax = ov.bars(df, x="title", y="worldwide_musd", title="Two films past a billion")
ov.save(ax, "gross.png")

Every chart takes a pandas DataFrame and returns a matplotlib Axes, so you can keep working on it with plain matplotlib afterwards.

The four charts

Function What it draws
bars(df, x, y) Ranked horizontal bars; the top bar stays bright, the rest cool off
line(df, x, y, group=None) A line over an ordered column, one per category if you pass group
scatter(df, x, y, color=None, size=None) Points, optionally colored by category and sized by a numeric column
histogram(df, column, bins=12) Distribution of one column, with the mean marked

All four also take title=, subtitle=, and ax=.

Supporting functions

  • use_theme(name="ithaca", grain=True) — apply the style. grain=False turns off the film grain.
  • palette(name) / current_palette() — the hex colors, if you want to reuse them.
  • save(ax, path, dpi=200) — write the chart out at presentation resolution.
  • sample_box_office() — the built-in dataset used in every example here.

The sample dataset

sample_box_office() returns one row per Christopher Nolan feature, with title, year, studio, runtime_min, budget_musd, domestic_musd, and worldwide_musd. It is here to give the charts something to draw.

The figures come from public box office reporting, compiled 2026-07-31. Grosses are lifetime and include re-releases; budgets are production budgets and exclude marketing; studio is the lead domestic distributor, which simplifies two films that split distributors by territory. The Odyssey is still in theaters, so its row is a snapshot that goes stale immediately. Verify against a primary source before citing any of it.

The look

Every chart is built from the same handful of decisions:

  • Never pure black. Frames are #0B0E12, a cold blue-black. Pure black reads as absent signal; a near-black reads as film stock. Text is bone white, not white.
  • 16:9 by default, the projection ratio.
  • Title-card typography. Headings are uppercase and letterspaced, set with thin spaces since matplotlib has no letter-spacing control.
  • 70mm grain. A faint noise field at 5% opacity over the whole figure. Turn it off with use_theme(grain=False).
  • Open frames. Top and right spines removed, hairline grid, ticks kept short.
  • Bronze against cold water. Hammered bronze leads; Aegean steel follows.

Palettes

Name Reads as
ithaca (default) Bronze against cold sea metal
aegean Sea and sky; water, distance, time
underworld Bone, ash, and rust; for grim subjects
ov.use_theme("aegean")

Gallery

Rendered by python examples/make_gallery.py.

Ranked bars Line Scatter Histogram

Development

python -m pip install -e ".[dev]"
python -m pytest -q          # 10 tests
python -m build              # writes dist/*.whl and dist/*.tar.gz
python -m twine check dist/* # check before uploading

Publish to TestPyPI first, then PyPI:

python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*

Use an API token, never a password, and never commit the token.

License

MIT — see LICENSE.

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

odyssey_viz_armand-0.3.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odyssey_viz_armand-0.3.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file odyssey_viz_armand-0.3.2.tar.gz.

File metadata

  • Download URL: odyssey_viz_armand-0.3.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for odyssey_viz_armand-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b765a9df5ee063a9867e8bd0a3286c7d9365efc0a8d81ea27e1c8373862966ab
MD5 7baa48b2baf634d22238280a5c294692
BLAKE2b-256 258bf8cbaea1d31c4c4d6434d92c9a4cab8bc40c8b82a92ac05a61ae8b7e14d8

See more details on using hashes here.

File details

Details for the file odyssey_viz_armand-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odyssey_viz_armand-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53911355befc859993b776ff063c4d7b3a6ff6757b57a33f55ca752fc74b6f1c
MD5 1162e5d52219173c56460bf39ff29a84
BLAKE2b-256 2d6134a57e4fa5a7727ebe2fc5de11e76d84f7301f28f850fba6d131e91f81a6

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