Skip to content

v0.3.0

Choose a tag to compare

@BenBotsch BenBotsch released this 19 Nov 14:38
· 21 commits to main since this release
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