Introducing Tesserax
Summary
A machine learning PhD, frustrated by existing scientific diagramming tools, developed Tesserax, a new Python library for programmatic SVG generation. Existing tools like Mermaid and Graphviz lack encapsulation and precision for complex diagrams, while TikZ, though powerful, is print-first, produces unmanageable web SVG, and is cumbersome for iterative changes. Tesserax addresses these issues by treating diagrams as functions of state, leveraging Python for logic and an "Anchor System" for relative object positioning, eliminating manual coordinates. It integrates with Quarto, targets native SVG for web compatibility and CSS styling, and aims to provide a lean, dependency-free solution for creating publication-quality scientific illustrations.
Key takeaway
For AI Scientists and Research Scientists creating complex diagrams for publications or documentation, consider adopting Tesserax to streamline your workflow. Its programmatic approach in Python eliminates the tedious manual adjustments common with tools like TikZ and offers native SVG output for better web integration. This shift allows you to version-control and debug diagrams like code, significantly reducing the effort required for revisions and ensuring consistency across your research outputs.
Key insights
Tesserax is a Python library for programmatic SVG diagrams, treating drawings as functions of state for scientific illustration.
Principles
- Diagrams should behave like code.
- Encapsulation is critical for diagramming.
- The browser is the new print driver.
Method
Tesserax uses a Pythonic approach with an "Anchor System" to define relative object positions and layouts, allowing diagrams to be generated programmatically based on logical state rather than hard-coded coordinates.
In practice
- Use Tesserax for complex scientific diagrams.
- Integrate Tesserax into Quarto workflows.
- Define diagram logic with Python functions.
Topics
- Tesserax
- Scientific Diagramming
- Python Libraries
- SVG Graphics
- Academic Publishing
Code references
Best for: AI Scientist, Research Scientist, AI Researcher, Software Engineer, Machine Learning Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by The Computist Journal.