--- name: scientific-visuals description: Create and inspect scientific figures and tables with explicit data provenance, uncertainty meaning, physical dimensions, and reproducible local exports. --- Use this skill for research plots, numerical comparison figures, uncertainty displays, trade-off diagrams, and table checks. Start from the user's data and intended claim. Identify the observation unit, variable definitions, units, transformations, sample sizes, exclusions, and uncertainty meaning before selecting a plot. Keep missing information visible in the caption or working notes. Do not invent measurements or infer that an error bar is a confidence interval. Choose a visual form that matches the question. Dots work for categorical comparisons when position is the useful encoding. Bars communicate magnitude from a meaningful zero baseline. Use an ordered line only when the horizontal coordinate supplies an actual order and continuity has a defensible meaning. Display estimates and intervals together, with an explicit description of the interval construction. For trade-offs, scatter observations and identify nondominated observations using declared objective directions. A frontier among observed points does not establish an achievable continuous boundary or a universal optimum. Use the small helper API in `../../tools/scientific_visuals.py` when appropriate. Import it from the project root as `from tools.scientific_visuals import comparison, export_figure`. Plot constructors return `(figure, axes)`, allowing ordinary Matplotlib edits. `figure_mm` defines the final physical canvas; its default minimum font is 8 pt. Increase the canvas or simplify content if labels crowd. The helpers use restrained defaults as editable starting points. They do not impose a publication's brand or replace journal requirements. See [the API reference](references/api.md) for signatures and validation rules. Before plotting, check shape, finite values, category alignment, uncertainty signs and units. Never silently remove NaN or infinity. A lower and upper endpoint is different from a lower and upper error magnitude. Keep that distinction explicit when calling `interval_plot` versus `comparison`. If several methods share an apparatus or dataset, label that shared origin accurately; a visual contrast is not evidence of independent replication. Use synthetic examples only for demonstrating presentation mechanics, and label the numbers and uncertainty widths as invented. Export SVG and PDF for vector workflows and PNG for raster delivery using `export_figure`. Physical dimensions remain fixed; exports do not apply a tight bounding box that would alter final size. Keep a data and caption record beside the output, including the generating command and any transformations. When a venue specifies dimensions, fonts or color constraints, apply those requirements and inspect the result at its intended size. The included palette is optional; distinguish groups through labels and shapes where useful. Run `audit_figure` before exporting, then use `python -X utf8 -B tools/visual_qa.py FIGURE --json` to inspect the file. The figure audit checks visible text size and canvas bounds. Export inspection checks dimensions, available font information and resources; PDF inspection covers every page and can render every page. Missing dependencies produce an incomplete result. A successful inspection means the checks ran, not that the figure is scientifically correct. Read [validation limits](references/integrity-and-final-size.md) and inspect the actual export for collisions, clipping, contrast, order and misleading emphasis. For CSV or TSV tables, run `tools/table_qa.py` with an explicit numeric locale. Review missingness, varying written decimal places, unit suffixes and malformed rows. Its report cannot establish significant figures, measurement validity or the correct interpretation of a column. For prose accompanying the figure, `tools/prose_metrics.py` supplies advisory descriptive counts, optional author-exemplar differences and user-selected short-paragraph inspection. Counts are neither editorial verdicts nor authorship detection.