tda-figure-spec

Generates publication-ready matplotlib figures for TDA analysis using standardized style constants.

1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/ZK-Theory/TDL --skill tda-figure-spec-zk-theory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tda-figure-spec
Source: https://github.com/ZK-Theory/TDL/tree/main/.agents/skills/tda-figure-spec
Command: npx skills add https://github.com/ZK-Theory/TDL --skill tda-figure-spec-zk-theory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib.

What problem does it solve? Producing consistent, publication-quality figures for topological data analysis (TDA) papers is error-prone when sizes, colors, and save conventions are chosen ad hoc. This Skill scaffolds matplotlib code that strictly follows the trajectory_tda/viz conventions so every figure matches the project's publication standards. ## Core Features & Use Cases - Standardized styling: Enforces use of PUBLICATION_RC, DPI, FIGSIZE_* constants, and STATE_COLORS from trajectory_tda/viz/constants.py — never ad-hoc sizes or colors. - Figure templates: Provides templates for persistence diagrams, barcodes, null-distribution histograms, and landscape comparison plots. - Output conventions: Routes production figures to papers/PXX/figures/ with fig{N}_ naming and working figures to figures/{domain}/ with date-prefixed names. - Use Case: When writing paper P01-B, ask for a persistence diagram figure and receive matplotlib code that imports the correct constants, applies annotation standards (exact p-values, no top/right spines, frameless legends), and saves both PDF and PNG outputs. ## Quick Start Ask the assistant to generate a publication-ready persistence diagram figure for paper P01-B following the trajectory_tda viz conventions.

Frequently Asked Questions about tda-figure-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a publication-ready persistence diagram in matplotlib?

Use the plot_persistence_diagram template, which scatters birth-death pairs on an axes configured with PUBLICATION_RC settings. Import FIGSIZE_* and STATE_COLORS from trajectory_tda/viz/constants.py rather than setting sizes or colors manually.

What figure size should I use for a full-width matplotlib plot?

Use FIGSIZE_FULL (190mm × 120mm) for a single full-width plot. Other options are FIGSIZE_WIDE for two-panel layouts, FIGSIZE_HALF for half-width panels, and FIGSIZE_SQUARE for heatmaps.

Which colormaps are allowed for TDA publication figures?

Use viridis, plasma, or RdBu_r for sequential and diverging data — never jet. State space plots must use the STATE_COLORS dictionary, and regime plots use plt.cm.tab10 with REGIME_LABELS ordering.

How should matplotlib figures be saved for papers?

Use the _save_figure pattern, which writes both a PDF and a PNG at the configured DPI. Production figures go to papers/PXX/figures/ with fig{N}_ naming; working figures go to figures/{domain}/ with date-prefixed names.

What are the limitations of this figure scaffolding approach?

It only covers the four provided templates: persistence diagrams, barcodes, null histograms, and landscape comparisons. Other figure types must still follow the same constants and annotation rules but require custom plotting code.