From 78f7ac35f0e7f746ecc3f150869d7ad406a9d4cf Mon Sep 17 00:00:00 2001 From: FridrichMethod Date: Mon, 16 Nov 2026 18:46:15 -0800 Subject: [PATCH] chore(release): 0.2.0 Bump the version to 0.2.0 and add CHANGELOG.md (Keep a Changelog) with the changes since the untagged 0.1.0. README says how to install a tagged release; AGENTS.md records how to maintain the changelog and cut a release. --- AGENTS.md | 11 +++++++++++ CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +++- pyproject.toml | 2 +- 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/AGENTS.md b/AGENTS.md index 1a846fe..cad96e6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,6 +25,17 @@ Always run these before `git commit` and `git push`: Do not commit or push if either fails. Fix issues first. +## Changelog and Releases + +- Record every user-visible change in `CHANGELOG.md` under `## [Unreleased]`, in the Keep a + Changelog sections (Added, Changed, Fixed, ...) with its PR number. +- The version lives only in `pyproject.toml` and follows Semantic Versioning; while it is 0.x, a + change that alters how existing figures look or breaks the API raises the minor version. +- To release: set the version in `pyproject.toml`, rename `## [Unreleased]` to + `## [X.Y.Z] - YYYY-MM-DD` above a fresh empty `## [Unreleased]`, update the compare links at + the bottom, merge that PR, then tag the merged commit on `main` as `vX.Y.Z` (annotated) and + publish a GitHub release from the tag with that version's changelog section as its notes. + ## Code Style - Ruff for linting and formatting (line length 100, Google-style docstrings) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7b39a74 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog + +All notable changes to mplplots are recorded here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.2.0] - 2026-11-16 + +First tagged release. Figures made with the GraphPadPrism style look different from 0.1.0: +smaller regular text, thinner lines, and saved files that are neither resized nor cropped. + +### Changed + +- GraphPadPrism style: every text element is Arial Regular 8 pt, including figure titles, + figure-level labels, and legend titles. It was bold, with a 14 pt base, 12 pt axis labels, + 16 pt titles, 10 pt tick labels, and an 8 pt legend. (#7) +- GraphPadPrism style: saved files are 600 dpi (`savefig.dpi`); the screen stays at 300 dpi. (#7) +- GraphPadPrism style: no figure size is set (it was 4.5 × 3 in). (#7) +- GraphPadPrism style: saved figures are not cropped (`savefig.bbox: tight` removed), so a file + has exactly the figure's size. Pass `bbox_inches="tight"` to `savefig` to crop. (#9) +- GraphPadPrism style: PDF and PostScript embed fonts as TrueType (Type 42) instead of Type 3, + so text stays editable; SVG stores glyphs as paths. (#7) +- GraphPadPrism style: axis lines, ticks, and data lines (including error bars) are 1 pt wide. + Axis lines and ticks were 1.5 pt and data lines 2 pt. (#11) +- README example images use the GraphPadPrism style and Arial throughout, are laid out in round + inches, and are saved as PNG, SVG, and PDF. Variables in their labels are math text. (#5, #8, #12) + +### Added + +- `mplplots.utils.add_axes_inches`, `legend_inches`, and `suptitle_inches` place axes (their + position and axis lengths), legends, and figure titles in inches, as GraphPad Prism sets axis + lengths. They keep their place when the figure is resized and at any dpi. `LegendCorner` is + the type of the legend anchor `loc`. (#10) + +### Fixed + +- `auto_ticks` prefers the smaller tick spacing when two spacings give the same number of + intervals, so an unset limit moves out only to the nearest major tick. Data from 0 to 2π with + `left=0` now ends at 8 instead of 10. (#6) + +## [0.1.0] + +Untagged initial version: the GraphPadPrism style (`STYLE_PATH`, `prism_style`), the palettes +in `mplplots.palettes` (`PALETTES`, `set_palette`, `get_colors`), `auto_ticks`, and +`add_custom_fonts`. + +[Unreleased]: https://github.com/FridrichMethod/mplplots/compare/v0.2.0...HEAD +[0.2.0]: https://github.com/FridrichMethod/mplplots/releases/tag/v0.2.0 diff --git a/README.md b/README.md index 1fc2a79..f31e230 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ palettes, and a few helpers for publication-quality scientific figures. pip install git+https://github.com/FridrichMethod/mplplots.git ``` -mplplots is not on PyPI. It needs Python 3.12 or newer and Matplotlib 3.8 or newer. +mplplots is not on PyPI. It needs Python 3.12 or newer and Matplotlib 3.8 or newer. To install a +release, append its tag, such as `...mplplots.git@v0.2.0`; [`CHANGELOG.md`](CHANGELOG.md) lists +what each release changed. ## Quick start diff --git a/pyproject.toml b/pyproject.toml index ffff00e..9a0c20c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "mplplots" -version = "0.1.0" +version = "0.2.0" description = "Visual styling helpers for Matplotlib/Seaborn" authors = [{ name = "Zhaoyang Li", email = "zhaoyangli@stanford.edu" }] license = { file = "LICENSE" }