Skip to content

GraphPadPrism style: stop cropping saved figures - #9

Merged
FridrichMethod merged 1 commit into
mainfrom
feat/style-no-tight-bbox
Nov 17, 2026
Merged

FridrichMethod merged 1 commit into
mainfrom
feat/style-no-tight-bbox

Conversation

@FridrichMethod

Copy link
Copy Markdown
Owner

Summary

Removes savefig.bbox: tight from GraphPadPrism.mplstyle. A saved file now has exactly the figure's size (e.g. 2 × 1.5 in at 600 dpi → 1200 × 900 px), which round-inch layouts rely on; before, the tight crop made the saved size depend on the drawn content. Passing bbox_inches="tight" to savefig still crops when wanted.

README's style table and AGENTS.md's style section describe the change.

Test plan

  • New test_saved_figure_keeps_its_size fails on the old style (207 × 159 px instead of 200 × 150 px at 100 dpi) and passes now.
  • Re-rendering both example scripts gives files byte-identical to main (they already saved uncropped).
  • pre-commit run --all-files
  • pytest (287 passed)

Drop savefig.bbox: tight, so a saved file keeps the figure's size, which
round-inch layouts rely on. Pass bbox_inches="tight" to savefig to crop.
Copilot AI balanced review requested due to automatic review settings November 17, 2026 02:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@FridrichMethod
FridrichMethod merged commit c4b7c97 into main Nov 17, 2026
3 checks passed
@FridrichMethod
FridrichMethod deleted the feat/style-no-tight-bbox branch November 17, 2026 02:07
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.

2 participants