Documentation · Thinking
Venn diagram
Name the sets, then say what falls in each region between them. A region is named by the sets it is in: A, AB, ABC.
When to use it
Explain membership and overlap between two or three sets, with captions for the regions.
Region keys identify intersections such as AB and ABC. Their captions are text; Tingraph does not infer mathematical set counts from them.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
venn "Three sets" {
set A "Set 1"
set B "Set 2"
set C "Set 3"
A "126"
B "129"
C "128"
AB "32"
AC "33"
BC "30"
ABC "9"
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Diagram
| Syntax | Meaning |
|---|---|
venn "Title" { | open a Venn diagram |
Sets
| Syntax | Meaning |
|---|---|
set A "Human" | name a ring; two or three of them |
set A "Human" "#2a78d6" | a ring in a colour of its own |
overlap 0.5 | how far the rings sit into each other |
Regions
| Syntax | Meaning |
|---|---|
A "126" | what is only in A |
AB "32" | what is in A and B but not C |
ABC "9" | what is in all three |
out "Kermit" | what is in none of them |
Look
| Syntax | Meaning |
|---|---|
style tint | outline, tint, bold |
colors colorful | auto, single, colorful, warm, cool, ink |
zeros on | write a nought in an empty region |
size 520 460 | how big the diagram is drawn |
# comment | line comment (also //) |
Language rules
- The file is one venn "Title" { ... } block. Nothing may sit outside it.
- Declare two or three sets with set A "Name", in order: A, then B, then C.
- A region is named by the sets it belongs to — A, AB, ABC — and out is what belongs to none of them.
- A region nobody names is left empty rather than drawn as a blank.
- Settings are written as name value, in any order.
- Do not invent settings. Every one the language has is listed above.
Edit on the canvas
- Drag a ring to adjust overlap. Select region captions to rename them through the figure controls.
- Change set names, region text and style using the Venn panel.
Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.
Read Saving & exportingWrite it with an assistant
Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.
Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a Venn diagram. Answer with Tingraph source only.
SYNTAX
Diagram
venn "Title" { open a Venn diagram
Sets
set A "Human" name a ring; two or three of them
set A "Human" "#2a78d6" a ring in a colour of its own
overlap 0.5 how far the rings sit into each other
Regions
A "126" what is only in A
AB "32" what is in A and B but not C
ABC "9" what is in all three
out "Kermit" what is in none of them
Look
style tint outline, tint, bold
colors colorful auto, single, colorful, warm, cool, ink
zeros on write a nought in an empty region
size 520 460 how big the diagram is drawn
# comment line comment (also //)
RULES
- The file is one `venn "Title" { ... }` block. Nothing may sit outside it.
- Declare two or three sets with `set A "Name"`, in order: A, then B, then C.
- A region is named by the sets it belongs to — `A`, `AB`, `ABC` — and `out` is what belongs to none of them.
- A region nobody names is left empty rather than drawn as a blank.
- Settings are written as `name value`, in any order.
- Do not invent settings. Every one the language has is listed above.
WORKED EXAMPLE
venn "Three sets" {
set A "Set 1"
set B "Set 2"
set C "Set 3"
A "126"
B "129"
C "128"
AB "32"
AC "33"
BC "30"
ABC "9"
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `venn "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.
MY DIAGRAM
Describe what you want here, then send this message.Something unclear? Contact support or read the Privacy Policy.