Esc

COMARK0414 · warning

comark/charts/non-numeric-x

Put numbers on the x of a scatter plot

A scatter plot places each row by its x value on a number axis, so its x column holds numbers. With names or dates there, the chart falls back to bars or a line.

Incorrect

::chart{type="scatter" title="Ducks and bread"}
| pond | bread (g) | ducks |
| --- | --: | --: |
| north | 400 | 12 |
| south | 150 | 7 |
| east | 250 | 9 |
::
md
lint-comark example.mdexample.md:1:1 comark/charts/non-numeric-x::chart 1: a scatter plot needs numbers in pond, its x.Use type="bar", or make x a column of numbers.✖ 1 problem

Correct

::chart{type="scatter" title="Ducks and bread"}
| bread (g) | ducks |
| --: | --: |
| 400 | 12 |
| 150 | 7 |
| 250 | 9 |
::
md
lint-comark example.md✔ No problems