Diagrams
ConnorGray/Diagrams is a project leveraging the symbolic representation capabilities of Wolfram Language for the purpose of creating diagrams.
Example Gallery
Domain Specific
StringEncodingDiagram
StringEncodingDiagram
is used to visualize the layers of abstraction and processing involved in encoding and displaying a string.
A diagram demonstrating each level of abstraction in processing “Hey 👋🏻”, using the variable-length encoding UTF-8:
![](Diagrams/0-Input.png)
![](Diagrams/1-Output.png)
CharacterSetDiagram
Render a code page for the specified 8-bit character set, and visualize how much its codepoint assignments overlap with Unicode:
![](Diagrams/2-Input.png)
![](Diagrams/3-Output.png)
MemoryLayoutDiagram
Visualize the layout of a 64-bit integer in memory:
![](Diagrams/4-Input.png)
![](Diagrams/5-Output.png)
Visualize the layout of a contiguous array of 16-bit integers in memory:
![](Diagrams/6-Input.png)
![](Diagrams/7-Output.png)
Visualize the layout of a struct in memory:
![](Diagrams/8-Input.png)
![](Diagrams/9-Output.png)
StackHeapDiagram
Show a diagram visualizing how data on the stack relates to data on the heap:
![](Diagrams/10-Input.png)
![](Diagrams/11-Output.png)
FileSystemTreeDiagram
Generate an ASCII art diagram of a file directory structure:
![](Diagrams/12-Input.png)
![](Diagrams/13-Output.png)
A more complicated example:
![](Diagrams/14-Input.png)
![](Diagrams/15-Output.png)
General Purpose
BlockStackDiagram
BlockStackDiagram
is used to visualize any concept that can be broken down into a stack of layers made up of blocks.
A diagram visualizing how a SIMD vector is composed of smaller units, and their layout in memory:
![](Diagrams/16-Input.png)
![](Diagrams/17-Output.png)
A diagram visualizing the OSI model of network communication layers:
![](Diagrams/18-Input.png)
![](Diagrams/19-Output.png)
TreeStackDiagram
![](Diagrams/20-Input.png)
![](Diagrams/21-Output.png)
![](Diagrams/22-Input.png)
![](Diagrams/23-Output.png)
![](Diagrams/24-Input.png)
![](Diagrams/25-Output.png)
MultiBlockStackDiagram
A multi-column block stack diagram, with first-class support for arrows between named regions:
![](Diagrams/26-Input.png)
![](Diagrams/27-Output.png)