Scatter Plot Maker
Scatter and bubble charts with trendlines, their equations and R².
One row per point: a column for x and a column for y (numbers). Extra columns can colour, size or label the points.
Chart
Arrow keys move from value to value; up and down switch series; Escape hides the tooltip.
Chart data as a table
Trendline results
| Points | Equation | R² | R² on y | n |
|---|
About the Scatter Plot Maker
Paste two or more columns of numbers and see how they relate. Each row is a point: one column for x, one for y. Colour the points by a category column (class, region, product type), size them by a third column to make a bubble chart, label them, and add a little jitter when many points sit on top of each other.
Add a trendline — linear, polynomial (degree 2–6), exponential, logarithmic or power — and the chart shows its equation and R². The fit uses least squares computed with a numerically stable QR method, tested against the NIST Statistical Reference Datasets. Copy the results or download the coefficients at full precision as CSV, and the chart as PNG or SVG. Everything runs in your browser.
How to use it
- Paste your data into Your data with one row per point, or open a CSV or Excel file. Keep each variable in its own column, with names in the first row.
- Under Scatter plot, choose the x and y columns; optionally a column to colour by, one to size the bubbles by, and one for point labels.
- Pick a trendline and, for a polynomial, its degree. Tick One trendline per colour to fit each group separately.
- Use log axes for data spanning several orders of magnitude, and jitter for repeated values such as ratings.
- Read the equations, R² and coefficients under Trendline results, then download the chart or the coefficients.
Examples
x: 0, 1, 2 y: 1, 3.5, 6
y = 2.5x + 1 · R² = 1
Three points on a straight line fit it exactly.
x: −1, 0, 1, 2 y: 3, 1, 1, 3
y = x² − x + 1 · R² = 1
The certified linear-regression test data from the NIST Statistical Reference Datasets
y = 1.002x − 0.2623 · R² = 0.999994
NIST certifies slope 1.00211681802045, intercept −0.262323073774029 and R² 0.999993745883712; the tool matches them (the full-precision values are in the CSV download).
Common uses
- Checking whether two measurements move together — study hours and marks, price and sales, height and weight.
- Finding a line of best fit and its equation for a lab report or homework.
- Comparing groups on the same axes with one colour (and trendline) each.
- Bubble charts with a third value, such as revenue or population.
- Spotting outliers and clusters before a deeper analysis.
The trendlines and how they are fitted
All fits are least squares (NIST/SEMATECH e-Handbook of Statistical Methods §4.1.4): the coefficients make the sum of squared vertical distances from the points to the curve as small as possible.
- Linear y = a + b·x and polynomial y = c₀ + c₁x + … + cₖxᵏ (degree 2–6): fitted directly.
- Logarithmic y = a + b·ln(x): a straight line in ln(x); needs x > 0.
- Exponential y = a·e^(b·x): a straight line through ln(y); needs y > 0.
- Power y = a·x^b: a straight line through ln(x) and ln(y); needs x > 0 and y > 0.
Points a model cannot use (such as y ≤ 0 for an exponential fit) are left out of that fit and counted in the notes. The calculation centres and scales x and uses a QR factorisation rather than the normal equations, so large x values (years, millions) do not lose precision; it reproduces the NIST certified results for the Norris, Pontius and Wampler data sets.
Reading R²
R² = 1 − SS_res / SS_tot: the share of the variation in y that the curve explains, from 0 (none) to 1 (every point on the curve). For exponential and power fits the curve is fitted to ln(y), so the R² shown is the one on ln(y); the results table also gives R² measured on y itself.
A high R² does not prove that x causes y, and a high-degree polynomial can reach a high R² by following noise — prefer the simplest model that fits.
Bubbles, colours and jitter
Bubble areas (not radii) are proportional to the size value, so a value twice as large gets a bubble with twice the area; the largest value gets the largest bubble. Colouring needs a text column with 2–12 different values. Jitter moves each point a few pixels at random (the same way every time, so downloads match the preview) — only the drawing moves; tooltips, the table and the trendline use the exact values.
Limitations
- Up to 10,000 points; take a random sample of larger data sets.
- Trendlines minimise vertical (y) distances; orthogonal (Deming) regression, weights and confidence bands are not included.
- Exponential and power fits use the logarithm of y, which gives more weight to small y values than a direct non-linear fit would.
- The equation on the chart rounds coefficients to 4 significant digits; use the CSV for calculations.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
How do I add a line of best fit?
Choose Linear under Trendline. The line, its equation (y = a + b·x) and R² appear on the chart, and the exact coefficients are in Trendline results.
Which trendline should I use?
Use linear when the points follow a straight band, exponential for steady percentage growth (doubling), logarithmic for growth that keeps slowing, power for relationships such as area and length, and a polynomial of low degree for one or two bends.
Why is R² different from what I expected for an exponential trendline?
Exponential and power curves are fitted as straight lines through ln(y), and the R² on the chart is measured on ln(y). The results table also shows R² on the original y values, which is usually a little lower.
How do I make a bubble chart?
Choose a third column of numbers under Bubble size. Each bubble’s area is proportional to that value; hover or tap a bubble to see all three values.
My points overlap — what can I do?
Turn on jitter to spread repeated values, lower the opacity so dense areas look darker, or make the points smaller.
Is my data uploaded?
No. The fitting and drawing happen in your browser. A share link stores the data inside the link after the “#”, which browsers never send to a server — anyone you give the link to can see the data.