MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface ContourPoint

    One point on one iso-value curve of a contour plot.

    A contour draws a scalar field as curves of constant value, so a layer is one curve per level -- structurally the multi-line layer LineTrace already navigates. What makes it a type of its own is that the level is a first-class object rather than a colour: the questions a reader brings are how many levels there are, where the 0.05 contour runs, and how far apart the curves are here.

    interface ContourPoint {
        x: string | number;
        y: number | null;
        z?: string;
        label?: string;
        yMin?: number;
        yMax?: number;
        level?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    x: string | number
    y: number | null

    The magnitude at this x, or null where the series has a position but no reading.

    A gap is not a zero. seaborn.pointplot pads a hue level missing from one category so its estimate lines stay the same length, and a producer that meets a break in a series has nowhere else to put it. Number(null) is 0, which would make the gap sound like a real low point, let it be reached as the row's minimum, and pull the range every other point's pitch is scaled against — the same trap toBarValue was written for (#925).

    null rather than a non-finite number because the payload has to survive JSON.parse: json.dumps writes NaN and Infinity as bare tokens that are legal JavaScript and invalid JSON, and a producer emitting one stops the chart initialising at all (xability/py-maidr#427).

    z?: string
    label?: string

    Ordinal level name announced in place of the raw numeric y, for a chart whose y axis is a category rather than a magnitude — a hypnogram's sleep stages, a Likert response, a severity grade. y stays numeric because it drives sonification, braille and the min/max range, so the human-readable name has to travel alongside it.

    An empty string counts as absent, so a producer that emits '' for an unnamed level gets the numeric announcement rather than a blank one. Omitting it entirely is the right shape for a continuous y.

    { x: 1.5, y: 3, label: 'REM' }
    
    yMin?: number

    Lower bound of the uncertainty around y, when the chart draws one.

    A fitted curve almost always comes with a band, and it is the reason the curve is drawn rather than a plain line: geom_smooth(se = TRUE) and sns.regplot both default to one. Carried on the sample rather than in a layer of its own so a reader hears the value and its interval at the same x — the comparison a band exists for is whether the trend is distinguishable from flat, and that cannot be made by navigating two layers in turn.

    Named to match ErrorBarPoint, so a producer that already computes an interval emits the same keys wherever it puts them.

    Both bounds are optional and independent: a one-sided interval is a real chart, and a sample missing its bounds still carries its value.

    yMax?: number

    Upper bound of the uncertainty around y. See LinePoint.yMin.

    level?: number

    The value of the field along this curve.

    Constant down a curve and carried on every point of it, the way z is: the grammar's unit is the point, and a producer emitting a flat list has nowhere else to put it.