![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
MPLLayout is a package to create precise figure layouts in matplotlib. It works by modelling figure elements using geometric primitives (for example, text anchors are points, the figure is a quadrilateral, etc.), then constraining the sizes and positions of these elements using geometric constraints (for example, fixing the width of a figure, constraining axes sides to be collinear, constraining axes to lie on a grid, etc.).
Using this approach, MPLLayout can:
The tutorial notebook in examples/tutorial.ipynb
demonstrates the basic usage of the package and explains some of the commonly used geometric constraints.
Other examples are also given in the examples
folder.
The notebook at examples/ten_simple_rules_demo.ipynb
contains an interactive demo to recreate a figure from "Ten Simple Rules For Better Figures" (Rougier, Droettboom and Bourne 2014).
A summary of how to use the package is shown in the figure below.
The process resembles creating and constraining geometry in computer-aided design programs like AutoCAD, SolidWorks, etc.
Matplotlib contains several strategies for creating figure layouts (for example, GridSpec
and subplots
for grid-based layouts).
While these approaches work well, greater control over figure element positions is sometimes desirable;
for example, when preparing figures for published documents, research papers, or slides.
You can install the package from PyPI using
pip install matplotlib-layout
Alternateively, clone the repository into a local drive. Navigate to the project directory and run
pip install .
The package requires numpy
, matplotlib
, and jax
.
This project is a work in progress so there are likely bugs and missing features. If you would like to contribute a bug fix, a feature, refactor etc. thank you! All contributions are welcome.
A similar project with a geometric constraint solver is pygeosolve
.
There is also another project prototype for a constraint-based layout engine for matplotlib
MplLayouter
, although it doesn't seem active as of 2023.
FAQs
A package for laying out figures with geometric constraints
We found that matplotlib-layout demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.