Schematex

Matrix / Quadrant diagram

About matrix diagrams

A matrix diagram places items in a two-dimensional space defined by two intersecting axes — most commonly a 2×2 quadrant grid — so that position conveys meaning at a glance. Product managers use the Eisenhower matrix to separate urgent work from important work; strategy consultants use the BCG matrix to allocate portfolio investment; HR teams use the 9-box grid to map performance against potential. The visual convention dates to the Boston Consulting Group's 1970s portfolio work and has been extended by frameworks like Ansoff, Johari, and RICE.

Schematex supports three matrix modes: quadrant (2×2 or 3×3 bubble plots with labeled axes), heatmap (N×M colored-cell grids), and correlation (N×M dot-intensity tables). Eight pre-built templates cover the most common frameworks out of the box, and all axis labels, quadrant names, and point properties are fully customizable.

matrix·§
↘ preview
100%
Matrix — Q3 Planning Matrix diagram (impact-effort template), quadrant mode, 6 point(s) Q3 Planning Major Projects Quick Wins Fill-ins Thankless Low Effort High Effort Low Impact High Impact Fix checkout timeout · (0.15, 0.82) · size 4 Fix checkout timeout Redesign onboarding · (0.72, 0.78) · size 5 Redesign onboarding Add dark mode · (0.78, 0.38) · size 3 Add dark mode Write runbook · (0.18, 0.32) · size 2 Write runbook API rate limiting · (0.55, 0.65) · size 4 API rate limiting Blog post series · (0.35, 0.55) · size 2 Blog post series reliability growth polish
UTF-8 · LF · 7 lines · 427 chars✓ parsed·6.8 ms·11.0 KB SVG

1. Your first matrix

The smallest useful matrix: a custom 2×2 with two labeled axes and three points.

matrix·§
↘ preview
100%
Matrix diagram Matrix diagram, quadrant mode, 3 point(s) Low Effort High Effort Low Value High Value Add search · (0.30, 0.80) Add search Rebuild pipeline · (0.85, 0.70) Rebuild pipeline Update footer · (0.20, 0.20) Update footer
UTF-8 · LF · 7 lines · 187 chars✓ parsed·1.2 ms·8.0 KB SVG

Four rules cover 80% of usage:

  1. Start with the keyword matrix, optionally followed by a template name or a quoted title.
  2. Set the axes with x-axis: and y-axis: — or use a built-in template and skip this step entirely.
  3. Each point is "Label" at (x, y) where x and y are decimal fractions from 0.0 (low/left/bottom) to 1.0 (high/right/top).
  4. Add optional properties — size:, category:, color:, shape:, highlight: — after the coordinates.

Comments must start with # anywhere on a line (outside quoted strings).


2. Built-in templates

A template pre-configures axes, quadrant labels, and grid size. Just use the template name as the second token on the header line.

TemplateGridUse case
eisenhower2×2Urgency / Importance task prioritization
impact-effort2×2Feature prioritization by impact vs. effort
rice2×2RICE scoring — Reach × Impact vs. Effort
bcg2×2Portfolio — Market Share vs. Growth rate
ansoff2×2Product/market growth strategy
johari2×2Self-awareness — known-to-self vs. known-to-others
9-box3×3HR talent review — Performance vs. Potential
risk-matrix5×5Risk assessment — Likelihood vs. Severity (heatmap)
matrix·§
↘ preview
100%
Matrix — This Week Matrix diagram (eisenhower template), quadrant mode, 5 point(s) This Week Schedule Do First Delete Delegate Urgent Not Urgent Not Important Important Ship hotfix · (0.10, 0.90) · size 5 Ship hotfix Team 1:1s · (0.10, 0.70) · size 3 Team 1:1s Write Q3 OKRs · (0.80, 0.85) · size 4 Write Q3 OKRs Inbox zero · (0.10, 0.30) · size 2 Inbox zero Refactor auth · (0.75, 0.40) · size 3 Refactor auth
UTF-8 · LF · 6 lines · 228 chars✓ parsed·1.1 ms·9.6 KB SVG

Axes and quadrant labels from a template can be overridden with explicit x-axis: / y-axis: / quadrant directives.


3. Axes

Axis lines declare the semantic poles of each dimension.

x-axis: Low Effort → High Effort
y-axis: Low Value → High Value

The arrow separates the low label (left / bottom) from the high label (right / top). All of these separators are equivalent:

SeparatorExample
(Unicode)x-axis: Rare → Certain
-> (ASCII)x-axis: Rare -> Certain
y-axis: Cheap ↑ Expensive
/ <- / <Reversed axis — high label is on the left

A reversed axis is for conventions where the "high" value sits at the left or bottom:

x-axis: High Market Share ← Low Market Share
matrix·§
↘ preview
100%
Matrix diagram Matrix diagram, quadrant mode, 4 point(s) Question Marks Stars Cash Cows Dogs Low Market Share High Market Share Low Growth High Growth Analytics Suite · (0.25, 0.35) · size 5 Analytics Suite ChatBot Pro · (0.20, 0.80) · size 4 ChatBot Pro Legacy CRM · (0.75, 0.25) · size 6 Legacy CRM Mobile App · (0.65, 0.75) · size 3 Mobile App
UTF-8 · LF · 13 lines · 366 chars✓ parsed·1.4 ms·9.1 KB SVG

4. Points

Each point is a bubble positioned by a normalized (x, y) coordinate pair.

"Label" at (x, y)
"Label" at (x, y) size: 4 category: design color: #7B1FA2 highlight: true note: "clarify spec"
PropertyValuesMeaning
size:positive numberBubble area weight (default: 3)
category:barewordColor group; drives the legend
color:hex stringOverride bubble color for this point
shape:circle | square | triangle | diamondBubble shape (default: circle)
highlight:trueDraws an emphasis ring around the bubble
note:quoted stringTooltip annotation
label:quoted stringReplaces the display label (different from the ID)

Coordinates outside [0, 1] are clamped to the chart boundary and flagged with a badge — the original value is stored for tooltip display.

matrix·§
↘ preview
100%
Matrix diagram Matrix diagram, quadrant mode, 5 point(s) Low Impact High Impact Rare Certain Vendor delay · (0.45, 0.70) · size 4 Vendor delay Security breach · (0.90, 0.30) · size 5 Security breach Budget overrun · (0.50, 0.65) · size 3 Budget overrun Key hire falls through · (0.60, 0.55) · size 3 Key hire falls through Scope creep · (0.40, 0.80) · size 4 Scope creep schedule security finance people
UTF-8 · LF · 9 lines · 404 chars✓ parsed·1.0 ms·10.0 KB SVG

5. Quadrant labels

Label each quadrant with a name and an optional subtitle.

quadrant Q1 "Do First"
quadrant Q2 "Schedule"
quadrant Q3 "Delete"
quadrant Q4 "Delegate"

# With an optional subtitle:
quadrant Q1 "Do First" description: "High urgency, high importance"

Quadrant numbering follows the standard mathematical convention: Q1 = top-right, Q2 = top-left, Q3 = bottom-left, Q4 = bottom-right. The Q prefix is optional — quadrant 1 "Label" is equally valid.


6. Heatmap mode

Heatmap mode fills N×M cells with color intensity instead of plotting bubble positions.

matrix heatmap 4x3 "Skill Matrix"
rows: [Strategy, Execution, Communication, Technical]
cols: [Junior, Mid, Senior]

cell (0,0) level: weak
cell (1,0) level: medium
cell (2,0) level: strong
cell (0,1) value: 7
cell (1,2) label: "Top 10%"
  • matrix heatmap COLxROW — header sets the grid dimensions.
  • rows: and cols: — comma-separated or bracket-list of axis labels.
  • cell (col, row) — zero-indexed, column first, row second (row 0 = bottom).
  • level:strong (3), medium (2), or weak (1) — shorthand for heat intensity.
  • value: — explicit numeric value (overrides level:).
  • label: — quoted text placed inside the cell.
matrix·§
↘ preview
100%
Matrix — Competency Heat Map Matrix diagram, heatmap mode, 0 point(s) Competency Heat Map Leadership Execution Communication Technical Junior Mid Senior Staff Low High
UTF-8 · LF · 20 lines · 524 chars✓ parsed·1.6 ms·9.3 KB SVG

7. Correlation mode

Correlation mode renders an N×M dot matrix where intensity represents the relationship strength between row and column variables.

matrix correlation 4x4 "Product Metrics"
rows: [DAU, Retention, Revenue, NPS]
cols: [DAU, Retention, Revenue, NPS]

cell (0,0) value: 1
cell (1,0) value: 0.82
cell (2,0) value: 0.54
cell (3,0) value: 0.71

The same cell syntax applies. level: strong | medium | weak is also accepted in correlation mode.


8. SIPOC mode

A SIPOC is the one-page scoping table that opens the Define phase of a Six Sigma DMAIC project. It names, in five fixed columns left to right, everyone and everything the process touches: Suppliers · Inputs · Process · Outputs · Customers. Before a team measures or improves anything, SIPOC pins down the boundary — "where does this process start, where does it end, and who hands work in and out of it."

matrix sipoc "Order fulfilment"
suppliers: "Vendor", "Warehouse"
inputs: "PO", "Stock levels"
process: "Receive order", "Pick", "Pack", "Ship"
outputs: "Shipped package", "Invoice"
customers: "End customer", "Finance"
  • Start with matrix sipoc, optionally followed by a quoted title.
  • Each of the five columns is its own directive: suppliers:, inputs:, process:, outputs:, customers:.
  • After the colon, list the entries as comma-separated quoted strings. A column may have any number of entries; the rows simply stack top-down inside that column.
  • The process: column is the high-level step sequence (typically 4–7 steps) — keep it to the major stages, not a detailed flowchart.

The five columns always render in the canonical S-I-P-O-C order regardless of the order you declare them, so the diagram reads correctly even if an LLM emits the blocks out of sequence.

matrix·§
↘ preview
100%
SIPOC — Order fulfilment SIPOC scoping table — 2 supplier(s), 2 input(s), 4 process step(s), 2 output(s), 2 customer(s) Order fulfilment Suppliers Suppliers: Vendor, Warehouse Vendor Warehouse Inputs Inputs: PO, Stock levels PO Stock levels Process Process: Receive order, Pick, Pack, Ship 1. Receive order 2. Pick 3. Pack 4. Ship Outputs Outputs: Shipped package, Invoice Shipped package Invoice Customers Customers: End customer, Finance End customer Finance
UTF-8 · LF · 6 lines · 217 chars✓ parsed·1.3 ms·9.0 KB SVG

9. QFD mode (House of Quality)

Quality Function Deployment (QFD) — the House of Quality, introduced by Yoji Akao — translates what customers want into the engineering characteristics that deliver it. Rows are the WHATs (customer requirements, each with an importance weight); columns are the HOWs (the measurable engineering characteristics the team controls). The body of the grid records how strongly each HOW serves each WHAT.

The differentiator: the engine computes the bottom row for you. Each HOW's technical importance is the sum down its column of weight × relationship strength — a ranked answer to "which engineering characteristic moves the most customer value, and is therefore worth the most effort." And the roof of the house — a half-matrix of diamond cells above the columns — records whether two HOWs help or fight each other.

matrix qfd "Coffee maker"
what: "Quiet operation" weight: 5
what: "Brews fast" weight: 3
what: "Energy efficient" weight: 4
how: "Fan RPM" dir: down
how: "Heater watts" dir: up
how: "Insulation" dir: up
rel (0,0): 9
rel (0,2): 3
rel (1,1): 9
rel (2,1): 3
rel (2,2): 9
roof (0,1): --
roof (1,2): +

WHATs and HOWs

DirectiveFormMeaning
what:what: "Label" weight: NA customer requirement (one row). weight: is its importance, conventionally 1–5. Declaration order is the row order, indexed from 0.
how:how: "Label" dir: up|downAn engineering characteristic (one column). Declaration order is the column order, indexed from 0. dir: is the optimization target — up = more is better, down = less is better.

Relationship cells

rel (i, j): strength records how strongly column-j HOW serves row-i WHAT. The index is (row, column), both zero-based.

StrengthMeaning
9Strong relationship
3Medium relationship
1Weak relationship
(omitted)No relationship — leave the cell out

This 9 / 3 / 1 scale is the QFD convention: it is deliberately non-linear so that one strong link outweighs several weak ones when the importance row is summed.

Computed technical-importance row

The engine sums each column to produce the technical-importance row at the foot of the house:

importance(j) = Σ over rows i  ( weight(i) × strength(i, j) )

For the coffee-maker example above the row computes to 45 / 39 / 51 — Insulation (51) is the highest-leverage characteristic, Heater watts (39) the lowest. This ranking is the deliverable: it tells the team where to spend engineering effort.

Add normalize: true (its own line, anywhere in the block) to show each column as a percentage of the total instead of a raw sum — for this example, 33% / 29% / 38%. Percentages make the relative priorities easier to read across very different weight scales.

The roof — HOW × HOW correlations

The roof is the triangular half-matrix sitting above the columns. roof (i, j): glyph records whether HOW i and HOW j reinforce or conflict with each other — the synergies and trade-offs a team must reconcile.

GlyphCorrelation
++Strong positive — improving one strongly helps the other
+Positive
-Negative
--Strong negative — improving one hurts the other (a trade-off)
(omitted)No correlation — leave the cell out

Each roof entry renders as a diamond cell in the standard QFD pitched-roof grid. In the example, roof (0,1): -- flags that pushing Fan RPM down while pushing Heater watts up is a trade-off, and roof (1,2): + flags that Heater watts and Insulation reinforce each other.

matrix·§
↘ preview
100%
QFD House of Quality — Coffee maker QFD House of Quality — 3 customer requirement(s), 3 engineering characteristic(s), 5 relationship(s); technical importance computed per column Coffee maker Roof: engineering correlation matrix Fan RPM ↔ Heater watts: strong negative Fan RPM ↔ Insulation: no correlation Heater watts ↔ Insulation: positive Fan RPM Heater watts Insulation Wt Quiet operation (weight 5) Quiet operation 5 Brews fast (weight 3) Brews fast 3 Energy efficient (weight 4) Energy efficient 4 Quiet operation × Fan RPM = 9 Quiet operation × Insulation = 3 Brews fast × Heater watts = 9 Energy efficient × Heater watts = 3 Energy efficient × Insulation = 9 Computed technical importance per engineering characteristic Technical importance Σ(wt×rel) 45 39 51
UTF-8 · LF · 14 lines · 296 chars✓ parsed·3.5 ms·10.1 KB SVG

10. Punnett mode (Mendelian genetics)

A Punnett square predicts the offspring of a genetic cross. You write only the two parental genotypes; the engine does the Mendelian bookkeeping — it enumerates each parent's gametes (one allele per gene locus), fills the grid with every gamete combination, and computes the genotype and phenotype ratios. The user never fills the grid.

matrix punnett "Eye color  (Bb × Bb)"
cross: Bb x Bb
trait B: "Brown eyes" / "Blue eyes"

The cross

DirectiveFormMeaning
cross:cross: Bb x BbThe two parental genotypes, separated by x, ×, or *. parents: is an accepted alias.
trait:trait B: "Dominant" / "Recessive"(optional) Names the two phenotypes for gene B, so the legend reads in plain English instead of B_ / bb.

Allele case sets dominance — this is the standard genetics convention. An uppercase letter is the dominant allele, the matching lowercase letter is recessive. A genotype groups alleles by letter: RrYy is two loci, R/r (round/wrinkled) and Y/y (yellow/green). One gene is a monohybrid cross (2×2 grid), two genes a dihybrid (4×4), three a trihybrid (8×8).

Computed ratios (the differentiator)

The engine derives, from the genotypes alone:

  • the gametes of each parent — the column and row headers — by taking one allele per locus (so a heterozygote Bb yields B and b);
  • the offspring grid — every gamete pairing, written dominant-allele-first (Bb, never bB);
  • the phenotype ratio — boxes grouped by which phenotype they express, reduced to lowest terms. A monohybrid Bb × Bb gives the classic 3:1; a dihybrid RrYy × RrYy gives the famous 9:3:3:1;
  • the genotype ratio — e.g. 1:2:1 (1 BB, 2 Bb, 1 bb) for the monohybrid.

Each box is tinted by its phenotype class, and the footer lists the phenotype ratio with a legend plus the genotype ratio.

matrix·§
↘ preview
100%
Punnett square — Seed shape &amp; colour (RrYy × RrYy) Punnett square — dihybrid cross RrYy × RrYy; phenotype ratio 9:3:3:1 Seed shape & colour (RrYy × RrYy) RrYy RrYy RY Ry rY ry RY Ry rY ry RRYY RRYy RrYY RrYy RRYy RRyy RrYy Rryy RrYY RrYy rrYY rrYy RrYy Rryy rrYy rryy Phenotype ratio 9:3:3:1 9 × Round, Yellow 3 × Wrinkled, Yellow 3 × Round, Green 1 × Wrinkled, Green Genotype ratio 4:2:2:2:2:1:1:1:1 — 9 distinct genotypes
UTF-8 · LF · 4 lines · 128 chars✓ parsed·2.7 ms·10.2 KB SVG

11. Config options

A config: block tunes visual rendering. Each option goes on its own indented line below the config: header.

config:
  quadrantBg: true
  gridLines: true
  axisArrows: true
  bubbleScale: area
  legendPosition: bottom-right
KeyValuesDefaultEffect
quadrantBgtrue | falsetrueColored quadrant background fills
gridLinestrue | falsetrueGrid lines overlay
axisArrowstrue | falsetrueArrows at axis ends
bubbleScalearea | radiusareaWhether size: scales bubble area or radius
quadrantAnnotationstrue | falsetrueShow quadrant label text in corners
legendPositionbottom-right | right | bottom-center | nonebottom-rightCategory legend placement
labelCollisionauto | offset-only | leader-only | offautoOverlap avoidance strategy for point labels
offChartPolicyclamp-badge | dropclamp-badgeWhat to do with points outside [0,1]

Two shorthand directives also work at the top level (not inside the config: block):

axis: off          # off | on | auto — show or hide the axis lines
margins: true      # true | false — show Score + Rank margins (correlation mode)

12. Labels & comments

  • Title: matrix "My Title" or title: My Title as a standalone line.
  • Point label: the quoted string before at (…).
  • Axis labels: x-axis: and y-axis: directives.
  • Quadrant labels: quadrant Q1 "Name" directive.
  • Comments: # anywhere on a line, outside quoted strings.
matrix "Prioritization"
# This is a comment
x-axis: Low Cost → High Cost   # inline comment after a directive
"Fix bug" at (0.1, 0.9) size: 3  # comment after a point

13. Table mode (style: table)

The default matrix rendering is a scatter / bubble chart — points float at (x, y) coordinates. For frameworks where the output is a list of items grouped by quadrant (Eisenhower, Johari, Impact-Effort, 9-box), use style: table to switch to a text-in-cell layout instead.

matrix eisenhower "This Week"
style: table
Q2: "Ship hotfix"
Q2: "Customer demo prep"
Q1: "Write Q3 OKRs"
Q1: "Refactor auth layer"
Q4: "LinkedIn updates"
Q3: "Reorganize Slack channels"

style: table applies these changes automatically:

EffectDetail
Axes and arrows hiddenNo axis lines, labels, or arrowheads
Grid lines hiddenOnly the outer border and cell dividers remain
Quadrant titles move inside cellsEach title becomes a cell header instead of a corner overlay
Items stack as a bullet listMultiple entries for the same quadrant stack top-down

Q1Q4 shorthand (2×2 only)

For 2×2 templates, use Qn: "item" instead of the longer cell (col, row) label: "item" form. Mapping:

ShorthandCellEisenhowerJohari
Q1:top-rightScheduleBlind
Q2:top-leftDo FirstOpen / Arena
Q3:bottom-leftDeleteHidden / Façade
Q4:bottom-rightDelegateUnknown

Repeat a shorthand key to add multiple items to the same cell:

Q2: "Ship hotfix"
Q2: "Customer demo prep"

For 3×3 grids (9-box), use cell (col, row) label: "…" directly — the Q shorthand is 2×2 only.

When to use table vs scatter

Use style: table forUse scatter (default) for
Eisenhower with task listsEisenhower with size: effort weights
Johari window coachingImpact-Effort with bubble = revenue
Backlog grouping (no numeric third dimension)RICE / BCG portfolio (third dimension IS the bubble size)
9-box talent reviewRisk heatmap (5×5 with numeric severity)
matrix·§
↘ preview
100%
Matrix — This Week Matrix diagram (eisenhower template), quadrant mode, 0 point(s) This Week Do First • Ship hotfix • Customer demo prep Schedule • Write Q3 OKRs • Refactor auth layer Delegate • LinkedIn updates Delete • Reorganize Slack channels
UTF-8 · LF · 8 lines · 186 chars✓ parsed·0.8 ms·7.4 KB SVG

14. Reserved words & escaping

Reserved at line start: matrix (header), x-axis:, y-axis:, quadrant, config:, title:, rows:, cols:, grid:, axis:, margins:, cell. In SIPOC mode: suppliers:, inputs:, process:, outputs:, customers:. In QFD mode: what:, how:, rel, roof, normalize:.

Point lines must start with a quote character (" or '). A line that does not start with a quote is not treated as a point.

Strings with spaces in axis labels do not need quoting — the text after the colon (and after the arrow) is taken verbatim. In note: and label: point properties, use double quotes.


15. Common mistakes

You wroteParser saysFix
"Fix bug" at (1, 2)Point parsed; x=1 clamped, y=1 clamped; off-chart badge shownKeep coordinates in [0.0, 1.0] or accept the clamp-badge
quadrant 1 "Quick Wins" (no Q prefix)Accepted — Q prefix is optionalBoth quadrant 1 and quadrant Q1 work
config: gridLines: false (on same line)Only config: keyword recognized; gridLines: false silently ignoredPut options on their own indented lines below config:
x-axis: "Low" → "High" (quoted labels)Arrow not found inside quotes — treated as plain textRemove quotes: x-axis: Low → High
matrix heatmap without dimensionsDefaults to 2×2; rows/cols directives set actual sizeSpecify dimensions on the header: matrix heatmap 4x4
cell (0, 0) level: Strong (capital S)level match is case-insensitive — acceptedBoth strong and Strong work
shape: ovalUnknown shape value — silently ignoredUse circle, square, triangle, or diamond
"Fix bug" at (0.1, 0.9) on an Eisenhower with a task listValid scatter point — but you probably wanted a list in a cellAdd style: table and use Q2: "Fix bug" instead
Q1: "item" on a 3×3 templateQ shorthand is parsed as a point line — silently droppedUse cell (col, row) label: "item" for 3×3 grids

16. Grammar (EBNF)

document     = header directive*

header       = "matrix" ( template-name | mode-header | title )? NEWLINE
template-name = "eisenhower"|"impact-effort"|"rice"|"bcg"|"ansoff"|"johari"|"9-box"|"risk-matrix"
mode-header  = ( "heatmap" | "correlation" ) ( number "x" number )? title?
             | ( "sipoc" | "qfd" | "punnett" ) title?
title        = quoted-string | bare-text

directive    = x-axis | y-axis | quadrant-dir | config-block
             | point | cell | q-short | rows-dir | cols-dir | grid-dir
             | style-dir | title-dir | axis-dir | margins-dir
             | sipoc-col | qfd-what | qfd-how | qfd-rel | qfd-roof | normalize-dir
             | punnett-cross | punnett-trait
             | comment | blank

# SIPOC mode
sipoc-col    = ( "suppliers:" | "inputs:" | "process:" | "outputs:" | "customers:" )
               WS quoted-string ( "," quoted-string )* NEWLINE

# QFD / House of Quality mode
qfd-what     = "what:" WS quoted-string WS "weight:" number NEWLINE
qfd-how      = "how:" WS quoted-string ( WS "dir:" ( "up" | "down" ) )? NEWLINE
qfd-rel      = "rel" WS "(" number "," number ")" ":" WS ( "9" | "3" | "1" ) NEWLINE  # (row, col)
qfd-roof     = "roof" WS "(" number "," number ")" ":" WS ( "++" | "+" | "-" | "--" ) NEWLINE  # (how, how)
normalize-dir = "normalize:" WS "true" NEWLINE

# Punnett (Mendelian genetics) mode
punnett-cross = ( "cross:" | "parents:" ) WS genotype WS ( "x" | "×" | "*" ) WS genotype NEWLINE
punnett-trait = "trait" WS letter ":" WS quoted-string WS "/" WS quoted-string NEWLINE  # dominant / recessive
genotype     = ( letter letter )+   # allele pairs grouped by letter; case = dominance, e.g. "RrYy"

x-axis       = "x-axis:" WS axis-spec NEWLINE
y-axis       = "y-axis:" WS axis-spec NEWLINE
axis-spec    = text arrow text  |  text   # plain text → high label only
arrow        = "→" | "->" | "↑" | "←" | "<-" | "<" | "↓"

quadrant-dir = "quadrant" WS "Q"? digit WS quoted-string ( WS "description:" quoted-string )? NEWLINE

config-block = "config:" NEWLINE ( INDENT key ":" WS value NEWLINE )*

point        = quoted-string WS "at" WS "(" number "," number ")" ( WS point-prop )* NEWLINE
point-prop   = "size:" number
             | "category:" bareword
             | "color:" hex-color
             | "shape:" ( "circle"|"square"|"triangle"|"diamond" )
             | "highlight:" "true"
             | "note:" quoted-string
             | "label:" quoted-string

cell         = "cell" WS "(" digit "," digit ")" ( WS cell-prop )* NEWLINE
cell-prop    = "value:" number
             | "label:" quoted-string
             | "level:" ( "strong" | "medium" | "weak" )

style-dir    = "style:" WS "table" NEWLINE
q-short      = "Q" ( "1" | "2" | "3" | "4" ) ":" WS quoted-string NEWLINE   # 2×2 only

rows-dir     = "rows:" WS label-list NEWLINE
cols-dir     = "cols:" WS label-list NEWLINE
grid-dir     = "grid:" WS number "x" number NEWLINE
axis-dir     = "axis:" WS ( "off" | "on" | "auto" ) NEWLINE
margins-dir  = "margins:" WS ( "true" | "false" | "on" | "1" ) NEWLINE

label-list   = "[" text ("," text)* "]" | text ("," text)*
quoted-string = '"' any-char-but-quote* '"' | "'" any-char-but-quote* "'"
comment      = "#" any NEWLINE

Authoritative source: src/diagrams/matrix/parser.ts. If this diverges from the parser, the parser wins — please open an issue.


17. Standard compliance

Schematex matrix diagrams implement the standard 2×2 quadrant convention used by the Boston Consulting Group (1970), Eisenhower decision matrix, Ansoff growth matrix, and Johari Window frameworks. The 9-box grid follows the McKinsey/GE talent review convention (3×3, performance × potential). Heatmap and correlation modes follow no named external standard but use the universal cell-intensity encoding found in tools like Excel conditional formatting and R's corrplot.

What is implemented today:

  • ✅ 2×2 quadrant mode with custom axes and quadrant labels
  • ✅ 3×3 quadrant mode (9-box template)
  • ✅ N×M heatmap mode with level: and value: cells
  • ✅ N×M correlation mode
  • ✅ SIPOC mode — five-column Suppliers · Inputs · Process · Outputs · Customers scoping table (Six Sigma DMAIC Define)
  • ✅ QFD / House of Quality mode — WHATs × HOWs grid, 9 / 3 / 1 relationship scale, computed technical-importance row (with normalize: true percentages), and the HOW × HOW correlation roof (++ / + / - / --)
  • ✅ Punnett mode — Mendelian cross from two parental genotypes; the engine computes the gametes, the offspring grid, and the genotype + phenotype ratios (monohybrid 3:1, dihybrid 9:3:3:1); allele case = dominance; optional trait phenotype names; mono/di/trihybrid (2×2 / 4×4 / 8×8)
  • ✅ Eight built-in templates (eisenhower, impact-effort, rice, bcg, ansoff, johari, 9-box, risk-matrix)
  • ✅ Point properties: size, category, color, shape, highlight, note
  • ✅ Reversed axes ( / <-)
  • ✅ Config block (quadrantBg, gridLines, axisArrows, bubbleScale, legendPosition, labelCollision, offChartPolicy)
  • style: table — text-in-cell layout with Q1Q4 shorthand (2×2) and stacked bullet lists
  • label: override on points (parsed, renderer support pending)
  • ⏳ Off-chart drop policy (parsed, renderer always clamp-badges today)
  • margins: correlation score/rank sidebar (parsed, not yet rendered)

References:

  • Henderson, B. (1970). The Product Portfolio. Boston Consulting Group.
  • Covey, S. (1989). The 7 Habits of Highly Effective People. (Eisenhower matrix popularization)
  • Ansoff, H.I. (1957). "Strategies for Diversification." Harvard Business Review.
  • Akao, Y. (1990). Quality Function Deployment: Integrating Customer Requirements into Product Design. Productivity Press. (House of Quality)
  • Pyzdek, T. & Keller, P. (2018). The Six Sigma Handbook (5th ed.). McGraw-Hill. (SIPOC in DMAIC Define)
  • Punnett, R.C. (1905). Mendelism. Macmillan. (the Punnett square); Mendel, G. (1866). "Versuche über Pflanzenhybriden."

18. Roadmap

Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject or ignore them.

  • Swimlane / zone overlays — named rectangular highlight regions drawn behind the grid.
  • Threshold lines — horizontal or vertical reference lines with labels (e.g. "break-even" line).
  • Bubble labels inside — option to print the point label inside the bubble rather than beside it.
  • Export to table — structured CSV / JSON output alongside the SVG for spreadsheet import.
  • 4×4 and custom-label quadrant mode — arbitrary NxM with labeled cells in quadrant (bubble-plot) mode, not just heatmap.

Track in the GitHub issues if you need any of these sooner.


Ready-to-use scenarios from the examples gallery:

matrix·§ Eisenhower (1954)
Matrix — This Week Matrix diagram (eisenhower template), quadrant mode, 0 point(s) This Week Do First • Ship hotfix • Customer demo prep Schedule • Write Q3 OKRs • Refactor auth layer Delegate • LinkedIn updates • Inbox zero Delete • Reorganize Slack channels
Eisenhower week prioritization
2×2 Eisenhower table grouping a week's tasks into Do First / Schedule / Delegate / Delete — the canonical text-in-cell layout, not a scatter chart.
productivity
matrix·§ Impact–Effort (Sondhi 1999)
Matrix — Sprint Planning — Q2 Backlog Matrix diagram (impact-effort template), quadrant mode, 0 point(s) Sprint Planning — Q2 Backlog Quick Wins • Add bulk-delete to inbox • Surface error message inline • Fix mobile menu z-index bug Major Projects • Rebuild billing on new stripe API • Multi-tenant workspace support Fill-ins • Brand color audit • Update tooltip copy Thankless • Animated empty-state illustrations • Internal admin dashboard polish
Impact-effort feature prioritization
2×2 impact × effort table sorting a backlog into Quick Wins / Major Projects / Fill-ins / Thankless — the classic PM prioritization grid.
product
matrix·§ Johari window (Luft & Ingham 1955)
Matrix — Self vs. Team — Q2 Reflection Matrix diagram (johari template), quadrant mode, 0 point(s) Self vs. Team — Q2 Reflection Open / Arena • Strong technical instincts • Direct in code review • Patient with juniors Blind • Interrupts in meetings • Hard to read when stressed Hidden / Façade • Imposter syndrome about leadership • Anxiety about cross-team politics Unknown • Capacity for difficult conversations under pressure
Johari window — manager self-assessment
2×2 Johari window placing self-traits across Open / Blind / Hidden / Unknown — the classic coaching exercise rendered as a four-cell table.
coaching
matrix·§ 9-Box Talent Grid (GE / McKinsey)
Matrix — Engineering — H1 Talent Review Matrix diagram (9-box template), quadrant mode, 0 point(s) Engineering — H1 Talent Review • Enigma • Samir K. (sr. eng) • Growth Employee • Priya R. (eng II) • Tomás L. (eng II) • Future Leader • Maya O. (sr. eng) • Dilemma • David C. (eng II) • Core Player • Lin H. (sr. eng) • Kofi A. (eng II) • High Impact • Reina S. (staff) • Under-performer • — PIP candidate — • Effective • Jordan P. (eng I) • Trusted Pro • Elena V. (staff)
9-box talent grid
3×3 performance × potential talent grid — the GE/McKinsey HR review tool used to plan promotions, succession, and performance management.
hr
matrix·§ BCG Growth-Share (1970)
Matrix — Product Portfolio — FY26 Matrix diagram (bcg template), quadrant mode, 5 point(s) Product Portfolio — FY26 Question Marks Stars Cash Cows Dogs High Market Share Low Market Share Low Growth High Growth Platform SDK · (0.80, 0.80) · size 5 Platform SDK Legacy API · (0.85, 0.15) · size 4 Legacy API Mobile SDK · (0.25, 0.85) · size 3 Mobile SDK Self-serve billing · (0.35, 0.75) · size 2 Self-serve billing On-prem installer · (0.20, 0.15) · size 1 On-prem installer star cashcow question dog
BCG product portfolio
BCG matrix plotting five product lines by market share and growth rate — stars, cash cows, question marks, and one dog — for annual investment planning.
strategy
matrix·§ Mendelian genetics (Punnett square)
Punnett square — Eye color (Bb × Bb) Punnett square — monohybrid cross Bb × Bb; phenotype ratio 3:1 Eye color (Bb × Bb) Bb Bb B b B b BB Bb Bb bb Phenotype ratio 3:1 3 × Brown eyes 1 × Blue eyes Genotype ratio 2:1:1 — 2 Bb, 1 bb, 1 BB
Monohybrid cross Punnett square (3:1)
The classic single-gene Punnett square — two heterozygous parents (Bb × Bb) crossed for eye colour. The engine computes the gametes, the 2×2 grid, and the canonical 3:1 dominant-to-recessive phenotype ratio with a 1:2:1 genotype ratio.
education
matrix·§ Mendelian genetics (Punnett square)
Punnett square — Seed shape &amp; colour (RrYy × RrYy) Punnett square — dihybrid cross RrYy × RrYy; phenotype ratio 9:3:3:1 Seed shape & colour (RrYy × RrYy) RrYy RrYy RY Ry rY ry RY Ry rY ry RRYY RRYy RrYY RrYy RRYy RRyy RrYy Rryy RrYY RrYy rrYY rrYy RrYy Rryy rrYy rryy Phenotype ratio 9:3:3:1 9 × Round, Yellow 3 × Wrinkled, Yellow 3 × Round, Green 1 × Wrinkled, Green Genotype ratio 4:2:2:2:2:1:1:1:1 — 9 distinct genotypes
Dihybrid cross Punnett square (9:3:3:1)
A two-gene Punnett square where the engine computes the gametes, the 4×4 offspring grid, and the canonical 9:3:3:1 phenotype ratio — Mendel's pea seed shape × colour cross — with each phenotype class auto-tinted.
education
matrix·§ Mendelian genetics (Punnett square)
Punnett square — Test cross (Bb × bb) Punnett square — monohybrid cross Bb × bb; phenotype ratio 1:1 Test cross (Bb × bb) Bb bb B b b b Bb bb Bb bb Phenotype ratio 1:1 2 × Blue 2 × Brown Genotype ratio 1:1 — 2 bb, 2 Bb
Test cross Punnett square (1:1)
A genetic test cross — crossing an organism of unknown genotype against a homozygous-recessive parent (Bb × bb) to reveal whether it is heterozygous. The engine computes the 1:1 phenotype ratio that signals a heterozygous parent.
education