Qu

pt

Builtin index · Core maths

result = figure_size(mm(180), mm(120))

Input: mm(180), mm(120) · Output: result

What it is

Length units as functions, converting a scalar v (millimetres/centimetres/inches/points as named) to the figure's own coordinate space — a tenth of a millimetre, so mm(1) is 10, cm(1) is 100, inch(1) is 254, and pt(1) is ≈3.528 (25.4/72 mm per point).

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = figure_size(mm(180), mm(120))
mm(180) —not documented yet
mm(120) —not documented yet
result scalar, Num, or number
Returns a scalar Num. There is no 180mm literal — a bare number is always taken as figure units directly.

Examples

No documentation example calls this form yet. The Core maths chapter is where one belongs.

How it works

loglog/semilogx/semilogy — thin convenience wrappers: plot the series, then set whichever axes the name implies to log scale (both already-real features, just not combined into one call before now). xscale("log") / yscale("log") -- set an axis scale on its own, without plotting anything. loglog/semilogx/semilogy below can only set a scale as a side effect of drawing a series, which leaves every plot that has no series -- a contour, a heatmap, an annotated but empty panel -- with no way to ask for a log axis at all. That is what blocked the ceiling map: the whole figure is a contourf on two log axes. pt(n) / mm(n) / inch(n) -- a size in the unit people actually think in, converted to the figure units everything here measures in. A figure unit is a tenth of a millimetre, which nobody has any intuition for. Writing fontsize = 7 meaning 7 point silently asks for 0.7 mm -- about two point -- and the result is a legend that renders but cannot be read. There is no safe way to guess which was meant (6-14 is a plausible number in either unit), so the unit is spelled: legend(fontsize = pt(7)).

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.

See also

mm, cm, inch — documented in the same entry.