Skip to content

Releases

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 27 Nov 11:59
uv add "figurekit==0.5.1"

Changed

  • The package is published on PyPI as figurekit, since figkit belongs to another project
    there. Install it with uv add figurekit; the module and the command stay figkit. A project
    that installed the Git tag replaces figkit @ git+... with figurekit in its dependencies.
  • The release workflow uploads the wheel and the source archive to PyPI with trusted publishing.

Changes: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 10:30
uv add "figkit @ git+https://github.com/BenBotsch/FigureKit@v0.5.0"

Added

  • figkit init copies the bundled tokens and their schema into a project and appends
    [tool.figkit] to its pyproject.toml. An existing tokens file is kept and checked; an
    existing table stops the command.
  • figkit style preview renders a specimen of every series, ramp and status colour in each
    theme of the project style or of --style.
  • Chart helpers: band shades an interval such as a confidence band in the colour of its
    series, error_bars draws thin bars without caps, callout points at a value with an arrow,
    small_multiples lays out panels on the canvas width with shared axes and ramp_cmap turns
    the ramp of a theme into a colormap.
  • The gallery shows small multiples with bands and a callout.
  • figkit check --a11y checks the colours of the style: text contrast after WCAG, the
    separation of neighbouring series with protanopia, deuteranopia and normal vision, and the
    steps of the ramp. It runs without a directory as well.

Changed

  • The dark ramp of the bundled style is stepped evenly in lightness. Three middle steps were
    less than 0.06 apart; dark heatmaps and the tiles of the dark card change their blues.
  • The example style in docs/examples/style orders its series teal, blue, amber, magenta, so
    that neighbours stay apart with deuteranopia.

Changes: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 07:51
uv add "figkit @ git+https://github.com/BenBotsch/FigureKit@v0.4.0"

Added

  • A style of your own. load_style reads a tokens file in the new version 2 with any number of
    themes, a default theme whose files carry no suffix, theme pairs, project font files in
    font.files and a css mapping for the stylesheet check. StyleError lists every problem of
    the file with its place and catches unknown keys; tokens.schema.json helps editors.
  • render, page, page_entry, path_for, check, check_tokens and ink_on take an
    optional style. figkit check pairs only themes that name a pair, and the manifest lists the
    files under the names of all themes.
  • Each Theme carries its fonts and sizes as Typography in theme.type; the helpers, rc and
    the minimum text size take them from the theme they draw with.
  • [tool.figkit] in pyproject.toml names tokens and css of a project. figkit.project()
    and figkit.project_style() read it, and figkit check uses it unless --style or --css
    override it.

Changed

  • figkit check --tokens is now --css; --tokens stays as an alias.
  • The bundled tokens.json uses version 2. Files without version still load as version 1 and
    give the same style. A version 2 file without css names no properties for check --css.
  • mono() and mono_ticks() accept a theme and use its mono family.

Fixed

  • A tokens file of version 1 defaults to light even when dark comes first in it.
  • A css index beyond a list token and an absolute pattern in font.files are a StyleError
    instead of a crash in check_tokens or load_style.
  • figkit check --css reports a stylesheet it cannot read instead of failing with a traceback.

Changes: v0.3.1...v0.4.0

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 19 Nov 20:18
uv add "figkit @ git+https://github.com/BenBotsch/FigureKit@v0.3.1"

Added

  • Each release attaches the wheel and the source archive. CI builds both and checks that the
    installed wheel renders figures with the bundled fonts.

Fixed

  • register_fonts accepts the bundled fonts when Windows gives the package a short 8.3 path,
    such as a virtual environment under C:\Users\RUNNER~1\.... Before, every figure failed with
    "not to the bundled file".

Changes: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@BenBotsch BenBotsch released this 19 Nov 14:38
uv add "figkit @ git+https://github.com/BenBotsch/FigureKit@v0.3.0"

Breaking changes

  • Importing figkit leaves the matplotlib backend alone. It no longer switches to Agg, so
    plt.show() and notebooks keep their backend. A batch job that only writes files can set
    MPLBACKEND=Agg.
  • Custom themes get their own file names. A theme other than light and dark writes
    <name>[.<language>]-<theme>.<format> instead of overwriting the light files.
  • German figures can change on the next render. Bar values, numbers at the end of a
    sentence and category names with numbers are written differently, see below.

Fixes

  • localize converts a number followed by a full stop: F1 is 0.95. becomes F1 is 0,95..
    Versions such as v0.1.2 stay as they are.
  • bar_labels writes the values it formats in the language of the figure, 0,93 in German.
    Texts passed as labels stay as given.
  • German tick labels leave category names unchanged when the categories are plotted as strings,
    such as ax.bar(["1.5 mm", ...]).
  • SVGs with embedded images, such as heatmaps drawn with imshow, are byte-identical on Linux
    and Windows. Before, Pillow builds compressed the same pixels to different bytes.
  • Theme is hashable and its status colours are read-only.
  • figkit check reports a malformed figures.json (invalid JSON, wrong types, missing files)
    instead of failing with a traceback.
  • figkit check --opaque card also covers the language files card.de.png and card.en.png.
  • page_entry reads the size of raster files from the dpi or pixel width of their output
    instead of assuming 250 dpi.

CI

  • Tests run on Ubuntu and Windows. CI regenerates the example gallery and fails if an SVG
    changes.
  • pre-commit runs ruff from uv.lock, so the hook and CI use the same version.

Full changelog: v0.2.1...v0.3.0