Skip to content

Variable: scatter ​

ts
const scatter: ExpressFunction<ScatterOptions>;

A scatter plot (px.scatter): one scatter trace (mode: 'markers') per group of color / symbol values, per facet and per frame. A numeric color is a colorscale on coloraxis instead; size scales marker areas; marginalX / marginalY add distributions above / right; trendline adds a fitted line per group ('ols', 'lowess', 'rolling', 'ewm', 'expanding'), with OLS fits in getTrendlineResults(figure).

Example ​

ts
const figure = scatter(rows, { x: 'gdpPercap', y: 'lifeExp', color: 'continent', logX: true });

Released under the MIT License.