Themes & Styling#
ARGscape includes four built-in themes designed for different use cases: interactive exploration, presentations, and publication figures. Each theme defines colors for all visualization elements including nodes, edges, mutations, and text.
Available Themes#
Theme |
Best For |
Description |
|---|---|---|
|
Interactive exploration |
Dark theme with cyan and green accents. The original ARGscape look. |
|
General use, presentations |
Light Apple-inspired theme with glass effects. Clean and modern. |
|
Publications (print) |
No colors, high contrast. Reproduces well in black-and-white. |
|
Publications (color) |
Optimized for print figures with distinct, accessible colors. |
Theme Details#
tskit#
The tskit theme is a dark theme inspired by the original ARGscape web application. It features cyan and green accents on a dark teal background.
viz = argscape.visualize(ts, theme="tskit")
When to use: Interactive data exploration, presentations in dark environments, matching the ARGscape web application aesthetic.
Color Palette:
Element |
Color |
Hex |
|---|---|---|
Background |
Dark teal |
|
Sample nodes |
Pale green |
|
Internal nodes |
Light blue |
|
Root nodes |
Cyan |
|
Edges |
Gray |
|
Text |
White |
|
Mutations |
Indigo |
|
liquid#
The liquid theme is a light, Apple-inspired theme with a clean, modern aesthetic. It is the default theme.
viz = argscape.visualize(ts, theme="liquid") # Default
When to use: General purpose, presentations with light backgrounds, screen-based viewing.
Color Palette:
Element |
Color |
Hex |
|---|---|---|
Background |
Light gray |
|
Sample nodes |
ARGscape green |
|
Internal nodes |
Slate |
|
Root nodes |
ARGscape green |
|
Edges |
Slate |
|
Text |
Near-black |
|
Mutations |
Indigo |
|
grayscale#
The grayscale theme uses only shades of gray, making it ideal for publications that may be printed in black-and-white.
viz = argscape.visualize(ts, theme="grayscale")
When to use: Publications requiring black-and-white compatibility, print figures where color reproduction is uncertain, accessibility.
Color Palette:
Element |
Color |
Hex |
|---|---|---|
Background |
White |
|
Sample nodes |
Dark gray |
|
Internal nodes |
Medium gray |
|
Root nodes |
Dark gray |
|
Edges |
Light gray |
|
Text |
Near-black |
|
Mutations |
Gray |
|
Tip
When using the grayscale theme, consider increasing node sizes slightly to maintain visibility without color differentiation.
paper#
The paper theme is optimized for publication figures with distinct, print-friendly colors that maintain their appearance in both digital and print formats.
viz = argscape.visualize(ts, theme="paper")
When to use: Academic publications, journal figures, posters, any print media where color is available.
Color Palette:
Element |
Color |
Hex |
|---|---|---|
Background |
White |
|
Sample nodes |
Blue |
|
Internal nodes |
Gray |
|
Root nodes |
Red |
|
Edges |
Dark gray |
|
Text |
Near-black |
|
Mutations |
Orange |
|
Note
The paper theme uses blue for samples and red for roots, providing clear visual distinction between node types that works well for colorblind readers.
Theme Comparison#
Here’s a side-by-side comparison of key colors across all themes:
Element |
tskit |
liquid |
grayscale |
paper |
|---|---|---|---|---|
Background |
|
|
|
|
Sample nodes |
|
|
|
|
Root nodes |
|
|
|
|
Edges |
|
|
|
|
Using Themes#
Basic Usage#
import argscape
# Use any theme by name
viz = argscape.visualize(ts, theme="tskit")
viz = argscape.visualize(ts, theme="liquid")
viz = argscape.visualize(ts, theme="grayscale")
viz = argscape.visualize(ts, theme="paper")
List Available Themes#
from argscape.viz.themes import list_themes
print(list_themes())
# Output: ['tskit', 'liquid', 'grayscale', 'paper']
Invalid Theme Names#
If you specify an unknown theme name, a ValueError is raised:
viz = argscape.visualize(ts, theme="unknown")
# Raises: ValueError: Unknown theme: unknown. Available: tskit, liquid, grayscale, paper
Recommendations by Use Case#
Use Case |
Recommended Theme |
|---|---|
Data exploration |
|
Conference presentation (dark room) |
|
Conference presentation (lit room) |
|
Journal figure (color) |
|
Journal figure (black-and-white) |
|
Poster |
|
Documentation/tutorial |
|
Web embedding |
|
Example: Export with Different Themes#
import argscape
import tskit
ts = tskit.load("example.trees")
# Create the same visualization with different themes
for theme_name in ["tskit", "liquid", "grayscale", "paper"]:
viz = argscape.visualize(ts, theme=theme_name, max_samples=50)
viz.export(f"figure_{theme_name}.png", dpi=300)
See Also#
Visualization - Main visualization function and parameters
Exporting Visualizations - Exporting figures in various formats