| name | plotting |
| description | Use this skill when the user asks to plot something, make a figure, generate a visualization, or create a chart using Python. It applies to run-based work where each plot should live in its own Python script, with plot-style parameters exposed as ALL_CAP variables at the top and a first-pass PNG generated by running the script. |
| metadata | {"short-description":"Create Python plots for runs"} |
Plotting
Use this skill for Python plotting tasks, especially in run-based workflows.
Workflow
- If the task belongs to a run, place each plot in its own dedicated script under that run folder.
- Keep plotting separate from data generation, metric computation, and analysis.
- Put all user-tunable plot controls at the very top of the plotting script as
ALL_CAPS variables.
- Save a PNG by default.
- After writing the plotting script, run it to generate a first-pass PNG for review.
- Expect the user to manually adjust the top-level variables for final styling.
File Layout
- Prefer
runs/<run_id>/src/plot_<topic>.py for plot scripts.
- Save figures under
runs/<run_id>/out/artifacts/ unless the user asks for a different output path.
- Use one script per plot. Do not combine multiple independent figures into one plotting file unless the user explicitly asks for that.
Script Rules
- The script should focus on plotting only.
- If upstream data preparation is needed, keep that logic in a different file and import or load its outputs.
- Expose style and layout controls near the top, for example:
FIGSIZE
DPI
TITLE
X_LABEL
Y_LABEL
LEGEND_LOC
TEXT_X
TEXT_Y
X_LIM
Y_LIM
LINEWIDTH
MARKER_SIZE
OUTPUT_PATH
- Avoid hardcoding style literals later in the script when they can be top-level parameters instead.
Execution Defaults
- Default output format is
.png.
- Run the script after creating it unless the user explicitly asked for draft-only work.
- Report the script path and PNG path in the final response.
Guardrails
- Do not submit Slurm jobs unless the user explicitly asks for submission.
- Do not invent data or metrics for the sake of making a plot.
- If there is no run context yet and the task clearly needs one, follow the repo's run workflow before adding plot scripts.