Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
Loading