Skip to content

0.42.2

Choose a tag to compare

@jrvannucci jrvannucci released this 21 Sep 12:53
· 17 commits to main since this release

Two layout fixes on top of 0.42.1.

Fixed

  • subplot_size= now works without an explicit tight_layout() call. Only tight_layout() measures the decorations the solve works around, and the render-time re-fit skipped any figure that had never had it called by hand -- so subplot_size= quietly did nothing for a caller who just built the figure and saved it, which is exactly what its own documentation said would work. Asking for a subplot size now arms that re-fit. subplots_adjust() still overrides it, since that sets the margins directly and leaves nothing to solve, and so does set_size_inches(): an explicit figure size is the caller taking control back, and the pending solve would otherwise resize the figure away from it on the next render.
  • A wrong-typed group= now says so. remove_group() and set_group_visible() accepted anything non-None in their group= slot and only failed later, somewhere else: set_group_visible(grp, False) -- a natural order to guess, since remove_group() really does take the group first -- bound group=False and died on 'bool' object has no attribute '_raw', and remove_group("G0") bound the title positionally and died on 'str' object has no attribute 'flat_axes'. Both now raise a TypeError naming what was passed, and the string case suggests title= instead.

Full Changelog: 0.42.1...0.42.2