Vega-Lite Scatter with Regression
A scatter plot with a fitted regression line drawn on top, computed by Vega-Lite's built-in `regression` transform — no client-side stats library needed. The transform supports linear, log, exponential, polynomial and power fits via the `method` parameter, returning the fitted cu
Template details
- chart
- scatter
- regression
- stats
- vega
- vega-lite
When to use this template
This visualization clearly shows the relationship between two numeric variables, highlighting both the overall trend and individual data points. It helps analysts quickly identify if a linear, exponential, or other functional relationship exists, quantify its strength, and spot outliers that deviate significantly from the predicted pattern. It's ideal for exploring causality or correlation and making data-driven predictions.
- Datasets with exactly two primary quantitative variables for comparison.
- Data where a functional relationship (linear, log, exponential, polynomial) is hypothesized.
- Moderate to large datasets (e.g., 50+ observations) to establish a trend reliably.
- Numeric variables with continuous or finely granular discrete values.
- Situations requiring visual assessment of correlation strength and direction.
- Identifying individual data points that are outliers relative to the overall trend.