Repository navigation
Examples: round-inch layouts, PNG/SVG/PDF output, GraphPadPrism style throughout - #8
Merged
Merged
Conversation
…hroughout - examples/_common.py holds the shared setup: the Arial check, add_axes, legend and suptitle helpers that place axes, legends and figure titles in inches, and save(), which writes PNG (600 dpi), SVG and PDF uncropped and without timestamps, so unchanged scripts reproduce the files byte for byte. - Every README figure except the Matplotlib-defaults comparison uses the GraphPadPrism style, including the palette demos. Figure sizes, axes positions and lengths, and legend anchors are round inches; demos pass no fontsize or fontweight. - All images are regenerated in the three formats. - README shows the images at 100 px per inch and documents the layout and formats; AGENTS.md records the rendering conventions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regenerates every README image for the new GraphPadPrism style (#7) and sets rendering conventions.
examples/_common.py(new) holds the shared setup:require_arial(): the scripts exit when Arial is not installed instead of writing images in a fallback font.add_axes,legend,suptitle: place axes (position and axis lengths), legend corners and figure titles in inches.save(): writesexamples/<name>.png(600 dpi),.svgand.pdf, uncropped (savefig.bbox: standard), without SVG/PDF timestamps and with a fixed SVG id salt, so rerunning an unchanged script reproduces all files byte for byte.fontsize/fontweight, so all text is the style's Arial Regular 8 pt.palettes_demo.pyuses the GraphPadPrism style, asstyles_demo.pydoes. Onlydefault_style(the Matplotlib-defaults comparison) is unstyled. Legends of multi-series plots sit outside the axes; scatter marker size is reduced (s=40→s=10) for the smaller panels.Test plan
ArialMTsubset (no Type 3); no SVG contains<text>.pre-commit run --all-files(ruff, mypy now also type-checkexamples/)pytest(286 passed)