Skip to content

CRT QQ plot: square axes, gray null, dashed diagonal, 14 pt font - #21

Open
OlgaPushkarev wants to merge 1 commit into
mainfrom
crt-qq-plot-style
Open

OlgaPushkarev wants to merge 1 commit into
mainfrom
crt-qq-plot-style

Conversation

@OlgaPushkarev

Copy link
Copy Markdown

Summary

Restyles the CRT calibration QQ plot (qq_plot_real_vs_null in src/Stage2_Evaluation/B_Calibration/src/CRT/qq_plot.py), used by both CRT.py paths (fresh results and plot_qq_from_cache) and the CRT notebook:

  • Square plot: figsize=(6, 6), the same 0..max range on both axes and equal aspect, so the y = x reference sits at 45 degrees
  • Null (NTC) points in gray instead of blue; real perturbations stay purple
  • Diagonal dashed at 50% opacity
  • Top and right spines removed
  • New font_size argument (default 14) applied to the title, axis labels, tick labels and legend

The signature change is backward compatible: existing callers don't need to change. The plotted data (raw p-values against uniform expectation on the -log10 scale) is unchanged.

The file is also ruff-formatted. The formatting matches what the nonperturbed-mouse-data branch already applies to this file, so merging both may give a small conflict here; resolve it by keeping this PR's plotting lines.

Testing

  • Redrew QQ plots from cached CRT outputs (plot_qq_from_cache) for two K values and four conditions; checked the rendering visually.
  • No tests reference this function.
  • tools/check_no_lab_specific_content.py --staged passes on this change. A full-tree scan of main still reports existing hits in unrelated files, which are removed on the nonperturbed-mouse-data branch.

🤖 Generated with Claude Code

qq_plot_real_vs_null now draws a square plot (6x6, shared 0..max range on
both axes, equal aspect) so the y = x line sits at 45 degrees; null (NTC)
points are gray; the diagonal is dashed at 50% opacity; top and right
spines are removed; title, axis labels, ticks and legend use a new
font_size argument (default 14). Existing callers are unchanged.

The file is also ruff-formatted (identical to the formatting already on
the nonperturbed-mouse-data branch).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant