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.
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.
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).
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).
Called with the point indices after a lasso select / deselect. JS-only — callbacks do not cross the R/Python bridge.
Point opacity in [0, 1].
Fraction of the data range to pad around the fitted view (larger = more zoomed out). Defaults to 0.04.
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.
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.
Draw the axis frame + ticks (embeddings usually hide axes).
Draw the legend (discrete swatches, or a colorbar when continuous).
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%.