Documentation · Data
Scatter plot
Write the points as (across, up) pairs, grouped into series. Everything here is also a control in the Chart panel.
When to use it
Plot paired measurements against two numeric axes, with optional series and a trend line.
Each point is an x/y pair. A fitted trend describes the supplied data; it does not establish causation or validate a research claim.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
scatter "Local Index by Year" {
x "Year"
y "Local index"
trend on
series "Local index"
(1900, 10) (1901, 9) (1902, 12) (1903, 15) (1904, 9) (1905, 40)
(1906, 4) (1907, 19) (1908, 25) (1909, 14) (1910, 20) (1911, 38)
(1912, 30) (1913, 60) (1914, 75) (1915, 55) (1916, 89) (1917, 95)
(1918, 69) (1919, 100) (1920, 92)
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Chart
| Syntax | Meaning |
|---|---|
scatter "Title" { | open a scatter plot |
Points
| Syntax | Meaning |
|---|---|
(12, 40) | one point, across then up |
(12, 40) "A. Cabbell" | a point with a name beside it |
series "Japan" (13, 4) | a named cloud of points |
series "J" "#e34948" (13, 4) | a cloud in a colour of its own |
Cloud
| Syntax | Meaning |
|---|---|
trend on | one straight line of best fit |
markers on | draw the points themselves |
Axes
| Syntax | Meaning |
|---|---|
x "Caption" | caption under the across axis |
y "Caption" | caption beside the up axis |
grid value | none, value, category, both |
range 0 250 | pin where the value axis runs |
Look
| Syntax | Meaning |
|---|---|
colors colorful | auto, single, colorful, warm, cool, ink |
colors "#2a78d6" | one colour, pinned |
style framed | plain, ruled, framed, bold |
legend bottom | auto, none, right, bottom, top |
values on | write the number on every mark |
size 520 340 | how big the chart is drawn |
# comment | line comment (also //) |
Language rules
- The file is one scatter "Title" { ... } block. Nothing may sit outside it.
- A reading is Name 40, one per line, and draws a point per reading. A name with a space or a comma in it goes in quotes.
- Settings are written as name value, in any order, before or after the readings.
- A word that is a setting name is never read as a reading; quote it if you need it as a name.
- Use series only when there is more than one thing being measured; a single series needs no series line at all.
- Do not invent settings. Every one the language has is listed above.
Edit on the canvas
- Drag individual points to change their coordinates; use the chart panel for exact values and named series.
- Choose axis ranges, point labels and the trend line through the chart settings.
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 scatter plot. Answer with Tingraph source only.
SYNTAX
Chart
scatter "Title" { open a scatter plot
Points
(12, 40) one point, across then up
(12, 40) "A. Cabbell" a point with a name beside it
series "Japan" (13, 4) a named cloud of points
series "J" "#e34948" (13, 4) a cloud in a colour of its own
Cloud
trend on one straight line of best fit
markers on draw the points themselves
Axes
x "Caption" caption under the across axis
y "Caption" caption beside the up axis
grid value none, value, category, both
range 0 250 pin where the value axis runs
Look
colors colorful auto, single, colorful, warm, cool, ink
colors "#2a78d6" one colour, pinned
style framed plain, ruled, framed, bold
legend bottom auto, none, right, bottom, top
values on write the number on every mark
size 520 340 how big the chart is drawn
# comment line comment (also //)
RULES
- The file is one `scatter "Title" { ... }` block. Nothing may sit outside it.
- A reading is `Name 40`, one per line, and draws a point per reading. A name with a space or a comma in it goes in quotes.
- Settings are written as `name value`, in any order, before or after the readings.
- A word that is a setting name is never read as a reading; quote it if you need it as a name.
- Use `series` only when there is more than one thing being measured; a single series needs no `series` line at all.
- Do not invent settings. Every one the language has is listed above.
WORKED EXAMPLE
scatter "Local Index by Year" {
x "Year"
y "Local index"
trend on
series "Local index"
(1900, 10) (1901, 9) (1902, 12) (1903, 15) (1904, 9) (1905, 40)
(1906, 4) (1907, 19) (1908, 25) (1909, 14) (1910, 20) (1911, 38)
(1912, 30) (1913, 60) (1914, 75) (1915, 55) (1916, 89) (1917, 95)
(1918, 69) (1919, 100) (1920, 92)
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `scatter "…" {` 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.