OpenParable
Skip to content
← Back to skills

Analysis Graphing

Documents
analysis-graphing

Analysis Graphing is an Agent Skill for documents published in the clshortfuse/renodx repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

RenoDX workflow for creating readable analysis graphs and plots from shader math, CSVs, EXRs, LUTs, hue sweeps, tone curves, gamut comparisons, energy/scalar maps, and test-pattern statistics. Use when graphing, plotting, visualizing, comparing curves, making dark-theme matplotlib figures, or avoiding repeated one-off plot scripts.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/clshortfuse/renodx/blob/HEAD/.agents/skills/analysis-graphing/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/analysis-graphing, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

RenoDX Analysis Graphing

Use this small skill for plots and graphs. Larger skills should call this out instead of embedding graphing rules.

Boundaries

  • Focus on visualizing data, not generating source test images or editing shaders.
  • Keep one-off plots and source scripts in a scratch output path unless the graph becomes a durable analysis artifact.
  • Promote repeated graph workflows into tools/analysis/ with the data export beside the image.
  • Prefer matplotlib for Python analysis unless an existing script in the same workflow already uses another plotting library.
  • Use bt2020-png-generation for final HDR PQ PNG writing and signaling.
  • Use hdr-test-pattern-generation for ramps, sweeps, charts, and synthetic image inputs.

Default style

  • Use a dark theme by default: plt.style.use("dark_background").
  • Save readable static images: usually PNG at dpi=150 to 180.
  • Choose figure sizes for labels first, not minimum pixels; common overview plots are 14x9, 16x11, or 17x11 inches.
  • Close figures after saving to avoid leaking state in batch scripts.
  • If the graph will be inspected in an issue or PR, prefer a single self-contained overview image plus any focused split images.

Plot checklist

For every generated graph, make the output self-describing:

  • Title states the experiment and transform/version being compared.
  • Axes include units: nits, linear RGB, PQ code value, hue degrees, stops, frame index, etc.
  • Legends use stable method names matching CSV column names or shader function names.
  • Include reference lines for anchors such as zero, diffuse white, mid-gray, 1.0, peak nits, or gamut boundary when relevant.
  • Do not normalize silently. If data is normalized, show the normalization factor in the title, label, or CSV.
  • Use log/stops axes only when the labels make the scale obvious.
  • Save the plotted source data as CSV when values are generated rather than loaded from an existing CSV.

Common RenoDX graph types

Graph typeUse forNotes
Tone/inverse diagnostic curveVanilla vs RenoDRT/PsychoV/ACES matchingMark diffuse white, mid-gray, peak, and shoulder anchors; inverse plots are for fitting/diagnosis, not final-frame inverse-tonemap strategy.
Gain/loss or delta plotComparing old/new math or fitted curvesPlot absolute output and error/delta, not only one.
Hue sweepGamut compression, hue preservation, negative-channel checksHue degrees on x-axis; include min/max channel or perceptual metric.
Gamut scatter / chip gridBT.709, BT.2020, AP1/AP0 comparisonsState source gamut and adaptation path.
LUT/stat overviewLUT pair comparisons, channel summaries, error histogramsKeep CSV summaries beside the graph.
Image diagnostic panelEXR/test-pattern before/after comparisonsUse fixed scales when comparing panels.

Existing examples

  • Dark plot template for a minimal reusable matplotlib setup.
  • tools/analysis/plot_cp2077_* for readable dark-theme multi-panel graphs.
  • tools/analysis/validate_mb_compress.py for hue sweep validation and CSV-plus-plot output.
  • scratch zelda_* curve and derivative plots.

Common mistakes to avoid

  • Do not output light-theme graphs unless the user explicitly requests that style.
  • Do not crop legends, tick labels, or colorbars; use tight_layout() or explicit layout spacing.
  • Do not mix scene-linear, display-linear nits, and encoded PQ values on one axis without clear labels.
  • Do not present a graph without preserving the script or source CSV needed to reproduce it.
  • Do not keep copying a repeated plotting scaffold across scratch scripts; promote the pattern when it recurs.