McUtils.Plots
A plotting framework that builds off of matplotlib
, but potentially could use a different backend.
The design is intended to mirror the Graphics
framework in Mathematica and where possible option
names have been chosen to be the same.
Difficulties with matplotlib
prevent a perfect mirror but the design is consistent.
There are a few primary divisions:
Graphics
/Graphics3D
/GraphicsGrid
provide basic access tomatplotlib.figure
andmatplotlib.axes
they also hold aGraphicsPropertyManager
/GraphicsPropertyManager3D
that manages all properties (image_size
,axes_label
,ticks_style
, etc.). The full lists can be found on the relevant reference pages and are bound asproperties
on theGraphics
/Graphics3D
instances.Plot/Plot3D
and everything in thePlots
subpackage provide concrete instances of common plots with nice names/consistent with Mathematica for discoverability but primarily fall back ontomatplotlib
built-in methods and then allow for restyling/data reuse, etc.Primitives
provide direct access to the shapes that are actually plotted on screen (i.e.matplotlib.Patch
objects) in a convenient way to add on to existing plotsStyling
provides access to theme management/construction
Image/animation support and other back end support for 3D graphics (VTK
) are provided at the experimental level.