Class / Object Diagram Skeleton
digraph G {
rankdir=TB;
node [shape=record, style="rounded,filled", fillcolor="#e0f2fe"];
User [label="{User|+id:int\l+name:string\l|+login()\l}"];
Session [label="{Session|+token:string\l}"];
User -> Session [label="1..*", arrowhead=vee];
}
Object, Component, Deployment, Use Case
Use Case: shape=ellipse
Object: shape=record with instance labels (user1:User)
Component: shape=component
Deployment: nodes as box + stereotypes in labels (<<node>>)
Actor Style 1: Emoji Actor (Simple)
Customer [shape=box, style="rounded,filled", fillcolor="#dcfce7", label="👤 Customer"];
Customer -> Login;
Actor Style 2: HTML-like Table Stickman
Actor [shape=none, margin=0, label=<
<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="6" BGCOLOR="#fff7ed">
<TR><TD><B>Actor</B></TD></TR>
<TR><TD> o <BR/> /|\ <BR/> / \</TD></TR>
</TABLE>
>];
Actor Style 3: Icon Font-like Label
Admin [shape=box, label="<<actor>>\\nAdmin", style="dashed,rounded"];
Guest [shape=box, label="<<actor>>\\nGuest"];
Color System
node [style="rounded,filled", color="#1d4ed8", fillcolor="#dbeafe", fontcolor="#0f172a"];
edge [color="#334155", penwidth=1.2, fontcolor="#334155"];
graph [bgcolor="white"];
Typography & Text Styling
graph [fontname="Arial", fontsize=12];
node [fontname="Arial", fontsize=11, margin="0.1,0.05"];
edge [fontname="Arial", fontsize=10, style=dashed];
UML Relation Mapping
Inheritance: Child -> Parent [arrowhead=empty]
Composition: Whole -> Part [arrowhead=diamond]
Aggregation: Whole -> Part [arrowhead=odiamond]
Dependency: A -> B [style=dashed, arrowhead=vee]
Association: A -> B [arrowhead=vee]
Default Standard
This generator defaults to UML-ready style and notation.
Switch standard tabs when you want flowcharts, network, architecture, or ERD conventions.
Basic Structure
digraph G { A -> B; } // Directed graph (arrows)
graph G { A -- B; } // Undirected graph (lines)
Nodes & Shapes
NodeName [label="Text"]; // Node with label
[shape=box] // box, circle, diamond, ellipse
[style=filled, fillcolor=lightblue] // Filled color
Connections
A -> B; // Directed edge (arrow)
A -- B; // Undirected edge (line)
A -> B [label="text"]; // Edge with label
[style=dashed] // dashed, dotted, bold
UML Relationships
Child -> Parent [arrowhead=empty]; // Inheritance / Extends
A -> B [arrowhead=diamond]; // Composition
A -> B [arrowhead=odiamond]; // Aggregation
A -> B [style=dashed]; // Dependency / Include
A -> B; // Association
Class Diagram
node [shape=record]; // Use record shape
Class [label="{Name|fields|methods}"]; // 3 sections
+ field\l // + public, - private, # protected
Use Case Diagram
Actor [shape=box, label="👤 User"]; // Actor (person)
UseCase [shape=oval]; // Use case (oval)
subgraph cluster_system { } // System boundary
Actor -> UseCase; // Association
[style=dashed, label="<>"] // Include/Extend
Sequence Diagram
Object [label=":ClassName"]; // Participant object
A -> B [label="1: message()"]; // Synchronous call
[style=dashed]; // Return message (dashed)
rankdir=TB; splines=ortho; // Top-to-bottom flow
Direction & Layout
rankdir=LR; // Left to Right
rankdir=TB; // Top to Bottom
rankdir=RL; // Right to Left
rankdir=BT; // Bottom to Top
Colors
color=blue, fillcolor=lightblue // Named colors
"#FF5733" // Hex colors
"rgb(255,87,51)" // RGB colors
Grouping
subgraph cluster_0 { A; B; } // Group nodes in box
node [style=filled]; // Default node style
edge [color=gray]; // Default edge style