Skip to content
Graphviz (DOT) templates

Decision Tree

Decision tree rendered via Graphviz DOT for clean splits.

Template previewGraphviz (DOT)
Rendering…

Make it your own.

digraph DecisionTree {
  rankdir=TB;
  node [shape=box, style="rounded,filled", fillcolor="#eef4ff", fontname="Inter"];
  root [label="Age >= 30?", fillcolor="#fde68a"];
  a   [label="Income >= 60k?"];
  b   [label="Owns house?"];
  l1  [label="Approve", fillcolor="#bbf7d0"];
  l2  [label="Review", fillcolor="#fde68a"];
  l3  [label="Approve", fillcolor="#bbf7d0"];
  l4  [label="Reject", fillcolor="#fecaca"];
  root -> a [label="yes"];
  root -> b [label="no"];
  a -> l1 [label="yes"];
  a -> l2 [label="no"];
  b -> l3 [label="yes"];
  b -> l4 [label="no"];
}