Best Data Viz
Relationship

Regression Plot

Scatter plot with a fitted trend line showing the linear or polynomial relationship between two variables.

Study Hours vs Test Score

Linear fit with R² = 0.98

View data (12 rows)
Chart data table: Study Hours vs Test Score
HoursScore
142
251
356
463
567
671
774
882
985
1088
1191
1296
Make a regression plot with your data

Use a regression plot when…

  • Quantifying linear relationship between variables
  • Prediction and forecasting
  • Showing goodness of fit (R-squared)

Avoid when…

  • Non-numeric data
  • When relationship is clearly non-linear and a line would mislead
  • Categorical comparisons

Data it needs

PropertyValue
Min Rows8
Min Columns2
Column Types
numbernumber

Visual anatomy

Marks
circleline
Channels
position-xposition-yline-slope
Axes
x-quantitativey-quantitative

Guiding principles

Consider instead

Common mistakes

  • Extrapolating far beyond the data range

  • Assuming correlation implies causation

  • Ignoring influential outliers that skew the fit

  • Forcing a linear fit on data that is clearly curved (try a polynomial or LOESS instead)

History

Least-squares regression was developed independently by Legendre (1805) and Gauss (1809). Francis Galton coined 'regression' in the 1880s studying heredity.

Accessibility notes

Report R-squared, slope, and intercept as text and describe trend direction (positive/negative). Distinguish the trend line from the points by stroke weight or dash pattern, not color alone — color-vision-deficient readers may see the line and points as a single hue.

Related reading

Got data? Let's see what works.

Drop your CSV. You'll get a Regression Plot plus four alternatives - ranked by which one actually fits your data best.