Skip to content

Diagnostics

Every problem is a diagnostic with a stable code, a message and the span of source it is about. None stops the rest of a file compiling: a value that is wrong is left off, a statement that cannot be written is left out, and the graph draws everything else.

Much of what is reported here is something Desmos would accept without a word - an unknown function name is a product of variables to it, and a colour it cannot read is ignored - which is why Axis says so instead.

What the lexer and the parser report. After one of these, the parser picks up again at the next line.

A character no token starts with.

a = 5 $ 2

A string still open at the end of its line.

"A note that never ends

A string escape other than \", \\, \n.

"A \q in a note"

# without exactly 3 or 6 hex digits.

y = x @ color: #12

The checker reports the same code for a colour that is not one (§4.3).

y = x @ color: red

A token no rule could use where it stands.

y = x )

An operand, element or value missing.

y = 2 +

A (, [, expression { or \| never closed.

y = (x + 1

A block { or @{ never closed.

folder "Waves" {
y = sin(x)

A block keyword without its {.

folder "Waves"

A style or macro name, a macro parameter, or a member name missing.

style { color: RED }

An import path, as title or image source missing.

image

A macro without its =.

macro double(a) 2a

with or for not followed by name = value.

y = a x with 3

sum, prod or int not opened with name = from..to.

y = sum(n, n)

Metadata or a block entry that does not start with a property name.

y = x @ 3

A property name followed by something other than : or the next entry.

y = x @ color RED

key: with nothing after it.

y = x @ color:

Block entries separated by a comma (§4.1).

config { showGrid: false, xmin: -5 }

Metadata trailing nothing.

folder "Waves" {
y = sin(x)
@ collapsed
}

What the checker and the compiler report about a file that reads, but does not mean anything Desmos can draw.

A call on a name that is not a function (§5.3).

y = sine(x)

Defining or binding a function’s name, an operator, pi, tau, e, infinity, true/false.

pi = 3

theta = …, which Desmos will not graph - write r = … (§5.5).

theta = 1

real, imag, conj or arg in a graph without allowComplex: true (§5.3).

a = real(3)

A function or a $ token the calculator the graph is for does not have.

A = (0, 0)
B = (4, 1)
s = segment(A, B)

A chart or a regression ~ anywhere but as a statement of its own.

L = [1, 2, 3]
H = histogram(L)

An empty slot, [4, , 6], anywhere but a table column’s values.

L = [1, , 3]

A range with an end left off anywhere but an index (L[2...]).

L = [1...]

A name in an expression with more than one _ part (x_1_2).

a = x_1_2

true or false in an expression - Desmos has no booleans.

a = true + 1

dt anywhere but the ticker’s handler (or a macro’s body).

a = dt

A sum, prod or int variable already bound where it stands.

f(k) = sum(k = 1..3, k)

A string where a value belongs.

a = "one" + 1

A property no placement has.

y = x @ colour: RED

A property this placement does not take, directly or through a style.

folder "Waves" { @ color: RED
y = sin(x)
}

A property given twice in one clause.

y = x @ color: RED, color: BLUE

A value of the wrong type for its property (§4.2).

y = x @ lines: 3

An enum value the property does not list.

y = x @ lineStyle: WAVY

A range for a property that takes none.

y = x @ lineWidth: 1..3

A table column that is an equation (x = 5).

table { x = 5 }

config inside a folder.

folder "Settings" {
config { showGrid: false }
}

ticker inside a folder.

n = 0
folder "Clock" {
ticker n -> n + 1
}

style inside a folder.

folder "Styles" {
style thick { lineWidth: 5 }
}

macro inside a folder.

folder "Macros" {
macro double(a) = 2a
}

A folder inside a folder.

folder "Outer" {
folder "Inner" { y = x }
}

A second config in one file.

config { showGrid: false }
config { showGrid: true }

A second ticker in one file.

n = 0
ticker n -> n + 1
ticker n -> n - 1

A second macro of one name anywhere in the compilation.

macro double(a) = 2a
macro double(a) = a + a

A macro named after a builtin, a function or a variable.

macro sin(a) = a

A macro used with the wrong number of arguments, or with or without () wrongly.

macro double(a) = 2a
y = double(x, 1)

A macro that expands into itself.

macro loop(a) = loop(a) + 1
y = loop(x)

A second style of one name anywhere in the compilation.

style thick { lineWidth: 5 }
style thick { lineWidth: 8 }

use: naming no style.

y = x @ use: bold

A style that uses itself, reported at the use: that closes the loop.

style a { use: b }
style b { use: a }

An import that cannot be read.

import "./lib/missing"

An import that closes a cycle.

graph.axis
import "./graph"

An image file that cannot be read.

image "./images/missing.png"

An image path that is not a picture by its extension.

image "./notes.txt"

What the decompiler reports, as warnings, about a graph it cannot write all of in Axis. The statement is still written, with a comment where the part it could not was.

CodeWhat
unsupported-latexLatex the expression tree has no node for.
unsupported-itemA list item Axis has no statement for, or an image with no URL.
unsupported-valueA colour or enum value Axis cannot write.