plotomics
    Preparing search index...

    Interface EmbeddingOptions

    interface EmbeddingOptions {
        aspect: "fill" | "equal";
        boundedView: boolean;
        categories: string[] | null;
        colormap: "viridis" | "rdbu" | "ltc" | "ltcdiv";
        colorMode: EmbeddingColorMode;
        mouseMode: "panZoom" | "lasso";
        onSelect: ((indices: number[]) => void) | null;
        opacity: number;
        padding: number;
        pointScaleMode: "asinh" | "linear" | "constant";
        pointSize: number;
        showAxes: boolean;
        showLegend: boolean;
        theme: Partial<PlotomicsTheme>;
        xLabel: string;
        yLabel: string;
    }
    Index
    aspect: "fill" | "equal"

    How the fitted view maps data units onto pixels. "fill" (default) stretches each axis independently so the cloud fills the canvas, which is what a UMAP wants: its axes carry no units and the shape is arbitrary. "equal" gives both axes the same units per pixel, so a distance means the same thing in x as in y. Use it whenever the axes share units and their relative spread is part of the claim, such as PCA or PCoA scores, where stretching draws a component explaining 4% as though it were worth as much as one explaining 34%.

    boundedView: boolean

    Keep pan and zoom inside the data: zooming out stops at the view that shows all of it, a pan stops at its edges, and zooming in stops at 1/10,000 of its range on each axis. false lets the view move freely. Either way a double-click, the reset button in the top right corner of the plot area, or resetView() goes back to the view of all the data. A double-click also clears the lasso selection.

    categories: string[] | null

    Explicit category order for categorical coloring. Categories are assigned palette entries by their position here, and every one of them gets a legend row even if no point carries it, so the colors stay put as the data changes. null (default) sorts text categories in natural order and numbers by value. Categories found in the data but missing from this list are added after it, in that order.

    colormap: "viridis" | "rdbu" | "ltc" | "ltcdiv"

    Ramp used for continuous coloring: "viridis", "rdbu", "ltc" or "ltcdiv".

    How to interpret the color column. "auto" detects from its type (strings ⇒ categorical, numbers ⇒ continuous).

    mouseMode: "panZoom" | "lasso"

    Primary drag gesture. "panZoom" (default) pans and zooms; "lasso" makes a plain drag draw a selection. Flip this to give users a lasso tool (the wheel still zooms in either mode).

    onSelect: ((indices: number[]) => void) | null

    Called with the point indices after a lasso select / deselect. JS-only — callbacks do not cross the R/Python bridge.

    opacity: number

    Point opacity in [0, 1].

    padding: number

    Fraction of the data range to pad around the fitted view (larger = more zoomed out). Defaults to 0.04.

    pointScaleMode: "asinh" | "linear" | "constant"

    How pointSize responds to zoom. "asinh" (default) and "linear" shrink points as you zoom out, which is what keeps a dense embedding readable. Both floor at one pixel once the camera scale drops below 1 / pointSize, so on a widely-scaled plot — anything whose data range is far from unit size, such as PCA scores — pointSize stops having any visible effect. "constant" sizes points in literal pixels regardless of zoom, which is what a small cohort scatter wants.

    pointSize: number

    Point radius in pixels. See pointScaleMode: under the default the renderer scales this by the camera, and on a view zoomed far out it clamps to a single pixel no matter what you pass here.

    showAxes: boolean

    Draw the axis frame + ticks (embeddings usually hide axes).

    showLegend: boolean

    Draw the legend (discrete swatches, or a colorbar when continuous).

    theme: Partial<PlotomicsTheme>
    xLabel: string
    yLabel: string