Repository navigation
v0.3.0
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
lightanddarkwrites
<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
localizeconverts a number followed by a full stop:F1 is 0.95.becomesF1 is 0,95..
Versions such asv0.1.2stay as they are.bar_labelswrites the values it formats in the language of the figure,0,93in German.
Texts passed aslabelsstay as given.- German tick labels leave category names unchanged when the categories are plotted as strings,
such asax.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. Themeis hashable and itsstatuscolours are read-only.figkit checkreports a malformedfigures.json(invalid JSON, wrong types, missing files)
instead of failing with a traceback.figkit check --opaque cardalso covers the language filescard.de.pngandcard.en.png.page_entryreads 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