Hi Everyone!
I wanted to share a project, mpllayout, I’ve been working on for creating figure layouts using geometric constraints. The package lets you model matplotlib figure elements using geometric primitives (quadrilaterals, lines, points, etc.) and use geometric constraints to arrange them in a desired layout (collinearity of lines, line lengths, coincidence of points, etc.). If you’ve used a CAD program like AutoCAD, solidworks, etc. then you’re probably familiar with approach!
The below figure shows the general idea of how it works.
This is similar to some of the layout strategies provided by matplotlib (subplots, GridSpec, constrained_layout) but just allows much more detailed specification of figure element locations.
I would love feedback on features that would be useful or contributions to the package. Hope people find it useful!
Jon