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

    Interface VolcanoPoint

    One point of a volcano or Manhattan plot.

    Both are scatters read almost entirely through a threshold: a volcano puts effect size against significance, a Manhattan puts genomic position against it. They routinely carry tens of thousands of points of which a few dozen matter, so the question is never "what is at this coordinate" -- it is "which points cross the line, and what are they called".

    interface VolcanoPoint {
        x: number;
        y: number;
        z?: number;
        label?: string;
        xLabel?: string;
        yLabel?: string;
        group?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    x: number
    y: number
    z?: number
    label?: string

    What the point is -- a country, a gene, a node of a tree.

    Distinct from ScatterPoint.xLabel and ScatterPoint.yLabel, which name the category a coordinate is a position for. "This slot on the x axis is called Norway" and "this point is Norway" are different statements, and a chart can make either one: a strip plot makes the first, a labelled scatter the second.

    On some charts identity is the whole payload rather than a decoration. A reader told "x is 2.3, y is 14.1" has been given the two numbers they can see the shape of already and withheld the one thing they came for -- which is why a volcano plot, a Manhattan plot and Observable's canonical country-names-against-GDP scatter are all drawn this way, and why Plot.text exists as a mark at all.

    Declared here rather than on VolcanoPoint, where it began: the field is a property of a point that has a name, not of one chart type, and VolcanoPoint inherits it unchanged.

    An empty string counts as absent, per ScatterPoint.xLabel.

    { x: 3.1, y: 14.2, label: 'Norway' }
    
    xLabel?: string

    The name of the category x is a position for, when the x axis carries names rather than measurements.

    x stays numeric because ScatterTrace does arithmetic on it — sort((a, b) => a.x - b.x), Math.hypot(center.x - _x, …), and the column index that stereo panning resolves through. 'a' - 'b' is NaN, so a string in x alone would give an unstable sort, a broken column index and a highlight that resolves to nothing. The name therefore travels alongside the position rather than in place of it, which is also what the chart is: a category at a slot.

    LinePoint needs no equivalent for x because it never subtracts one — LinePoint.x simply widens to string. LinePoint.label is the same idea as this one applied to a line's y, which cannot widen because it drives sonification.

    A categorical scatter is not a rare shape: it is what seaborn.stripplot, seaborn.swarmplot and ggplot2::geom_jitter draw, and what any geom_point on a discrete scale draws. Without this a reader hears "g is 0" where the chart says "a" (#927).

    An empty string counts as absent, so a producer emitting '' for an unnamed slot gets the numeric announcement rather than a blank one.

    { x: 0, xLabel: 'a', y: 12.5 }
    
    yLabel?: string

    The name of the category y is a position for, for the same reasons ScatterPoint.xLabel gives.

    Both axes carry one because either can be the categorical one: a strip plot drawn sns.stripplot(df, x='g', y='v') puts the names on x, and sns.stripplot(df, y='g', x='v') puts them on y. A single un-suffixed label would leave a consumer guessing which coordinate it names.

    { x: 12.5, y: 0, yLabel: 'a' }
    
    group?: string

    The region the point belongs to -- a chromosome on a Manhattan plot.

    Announced alongside the point, because "which chromosome is it on" is the second question every one of these charts is read for.