Math Figures Scatter Plot Generator
01234567891012345678910

Scatter plots with a line of best fit

The Scatter Plot Generator draws a scatter plot from paired data you type or paste: an x and a y value for each point, such as hours studied and test score. The axes fit the data, with a step of room past it at each end, unless you set them, and an axis that starts well past 0 begins with a zig-zag break, so the points fill the graph.

Add the least-squares line of best fit, worked out as LinReg on a calculator, or draw your own line from its equation. Write the equation and the correlation coefficient r (or r²) below the graph, or leave a blank line for students to fill in the equation, or show the points alone for students to draw a line by eye.

What you can set

  • The data, as a table of x and y values or a list of pairs pasted from a spreadsheet
  • Dots or crosses for the points
  • A line of best fit: none, least squares, or your own typed as y = mx + b
  • The line’s equation (written, as a blank line or hidden) and r or r² below the graph, rounded to the places you choose
  • A chart title and axis titles, as text or a blank line for students
  • Each axis’s range and count-by, worked out from the data unless you type them, and which lines are numbered
  • Light, standard, bold or no gridlines, and minor gridlines

Copying, printing and sharing

Copy the figure straight into a test, worksheet or slide, or download it as a PNG or SVG. Printing the page prints just the figure. Share link copies the page’s address with your settings in it, so anyone who opens it sees this exact figure, and presets save settings you use often in your browser. It’s free, with no sign-up.

Frequently asked questions

How is the line of best fit worked out?

It is the least-squares regression line through every point, the same line a TI-84’s LinReg(ax+b), Desmos or a spreadsheet’s trendline gives. Its equation is rounded to the decimal places you choose.

Can students draw the line of best fit themselves?

Yes. Leave the line off for students to draw one by eye, or draw it and set the equation to a blank line so they write it. You can also type your own line, such as y = 2x + 10, to show a line drawn by eye.

Why does an axis have a zig-zag?

When the data starts far from 0, such as test scores from 55 to 95, the axis starts a step below the data and the zig-zag shows that part of it has been left out. Type 0 in the axis’s From box to start it at 0 instead.

Can I paste data from a spreadsheet?

Yes. Copy two columns, x then y, and paste them into the table, or into the list of pairs. A row of column headings is skipped.

← All math figures