Scatter Plot Generator — Chart Data Online
Scatter Plot Generator
| Points plotted | 8 |
| Slope | 1.986 |
| Intercept | 0.064 |
| R² (coefficient of determination) | 0.9988 |
The trend line is an ordinary least squares fit, and R² is the proportion of the variance in y that the line explains. R² near 1 means the points sit almost on the line; R² near 0 means the line explains little and a different relationship is probably at work. A high R² still does not establish causation.
What Is
A scatter plot places one marker per observation at the coordinate formed by two measured variables. The horizontal axis conventionally carries the independent or explanatory variable, the one you control or believe drives the relationship, and the vertical axis carries the dependent variable, the outcome you are trying to explain. That convention matters, because the choice of which variable goes where determines the meaning of the picture: a strong upward cloud plotted as dose against response tells you that more dose goes with more response, while the same data plotted in reverse says only that the response increases when the dose decreases. Reading shape is reading relationship. A tight ascending cloud is a strong positive association, a descending one is a strong negative association, a shapeless blob is little or no linear association, and recognisable curves or funnels indicate that a straight line is the wrong model.
No scatter plot on its own establishes causation, and this is the single most abused idea in the genre. Two variables can share a trend because one causes the other, because both are caused by a third, because one causes the other in only some circumstances, or purely by coincidence in a sample that happened to be drawn that way. The trend line offered here is an ordinary least squares fit, which finds the single straight line y equals slope times x plus intercept that minimises the total vertical squared distance between the line and the points. The slope is the average change in y per unit change in x, and the intercept is the fitted value of y when x is zero, which is only meaningful if zero is actually inside the range of your x data. R², the coefficient of determination, is the proportion of the total variance in y that the line accounts for: it equals one minus the residual sum of squares divided by the total sum of squares around the mean.
An R² of 0.99 means the line explains ninety-nine per cent of the observed spread in y, so the remaining one per cent is what you have not modelled. An R² near zero means the line explains almost nothing and a different form of relationship, or simply noise, is the better description. Crucially, R² is always non-negative and always rises when you add predictors, so a large R² is evidence of a strong linear association and never by itself evidence of a causal mechanism.
How to Use
- Type or paste your data into the large text area, one x,y pair per line. Pairs may also be separated by spaces or semicolons, and the two numbers may be split by a comma, a colon or a tab.
- Check the red Skipped as unreadable message under the box. Anything that could not be parsed as two finite numbers is named there, so a typo never disappears quietly.
- Type your variable names into the X axis label and Y axis label inputs so the chart identifies the explanatory and dependent variables instead of showing bare x and y.
- Leave the Trend line checkbox ticked to fit an ordinary least squares line across the cloud, or untick it to see the raw distribution with no model imposed on it.
- Drag the Point size slider between 2 and 14 to suit your density. Small markers suit dense datasets where overlap carries the information; large markers suit a handful of points.
- Read the table under the chart for Points plotted, then Slope, Intercept and R². Hover any marker to see its exact coordinate, which is useful when points sit close together.
- If every x value is identical the fit cannot be computed and the statistics rows disappear, because no straight line can explain a variable that never varies.
- Click Download SVG to save a standalone vector copy of the chart with your axis labels baked in, ready to embed in a document.
Examples
Input: The 8-point sample dataset shipped in the tool (1, 2.1) through (8, 15.8)
Process:
Ordinary least squares: slope = (nΣxy − ΣxΣy) / (nΣxx − (Σx)²) = (8x407.4 − 36x72) / (8x204 − 36²); R² = 1 − SSres / SStotResult: 8 points plotted, slope 1.986, intercept 0.064, R² 0.9988 — the points sit almost exactly on the line
Input: A noisier 6-point series: 1,4 2,7 3,5 4,9 5,6 6,11
Process:
slope = (6x165 − 21x42) / (6x91 − 21²) = 1.029; SStot = 34, SSres = 15.486, so R² = 1 − 15.486/34Result: 6 points plotted, slope 1.029, intercept 3.4, R² 0.5445 — a real trend, but most of the spread is left over
Input: Four points whose x never changes: 5,10 5,12 5,11 5,9
Process:
nΣxx − (Σx)² = 4x100 − 20² = 0, so the denominator is zero and no line can be fittedResult: 4 points plotted, no trend line drawn, slope/intercept/R² rows hidden — the explanatory variable never varied
Input: Mixed entry with a typo: 1,2 oops 3,5.5 4,4 5,9
Process:
The token 'oops' has no second number, so it is reported as unreadable and the remaining four pairs are fitted normallyResult: 4 points plotted, unreadable: oops, slope 1.471, intercept 0.343, R² 0.7234
Related Searches
People also search for: scatter plot, scatter plot generator, make a scatter plot, correlation, trend line, line of best fit.
scatter plotscatter plot generatormake a scatter plotcorrelationtrend lineline of best fitleast squares regressionr squaredcoefficient of determinationcorrelation coefficientdata visualisationstatistical chartx and y variablesregression linechart data onlineno install chartinteractive scatter chartexport chart svg
Frequently Asked Questions
What does R² actually mean, and what is a good value?
R² is the proportion of the total variance in y that the fitted line accounts for, computed as one minus the residual sum of squares divided by the total sum of squares around the mean. An R² of 0.95 means the line explains ninety-five per cent of the observed spread in y and leaves five per cent unexplained. There is no universal threshold: a physics simulation may legitimately sit at 0.999 while noisy social data at 0.3 is still a meaningful finding. Judge it against how much residual scatter the subject matter should produce.
Does a high R² prove that one variable causes the other?
No, and this is the most common misreading of a scatter plot. A tight line with an R² of 0.99 is entirely compatible with a shared third variable driving both, with causation running in the opposite direction, or with causation that only holds under conditions your sample never tested. Correlation is a necessary but nowhere near sufficient condition for causation. Establishing cause requires a design argument, such as random assignment or a credible natural experiment, not a fitted line through a cloud of dots.
What do the slope and intercept mean in plain terms?
The slope is the average change in y associated with a one unit change in x, so a slope of 1.986 means each additional unit of x goes with roughly two extra units of y on average across your data. The intercept is where the fitted line crosses y equals zero, so an intercept of 0.064 means the model predicts y near zero when x is zero. Only trust the intercept if x equals zero actually falls inside your observed range of x; outside it, the line is an extrapolation and the intercept is an artefact of the model rather than an observation.
Why do my slope, intercept and R² rows sometimes disappear?
Two situations produce no fit. First, you need at least two distinct points; a single data point cannot define a line. Second, the x values must vary. If every x is identical the denominator of the least squares formula is zero, and mathematically no slope can be chosen that passes meaningfully through points with no horizontal spread. In that case the chart still draws and still reports the number of points plotted, which is exactly the diagnostic you want, because it tells you the variable you meant to plot never actually changed.
What input formats does the data box accept?
Several. Within a pair you can separate x and y with a comma, a colon or a tab, and between pairs you can use newlines, spaces or semicolons, since any run of whitespace or semicolons counts as a pair boundary. That means a single line like 1 2, 3 4; 5 6 pastes correctly. Negative numbers, decimals and scientific notation all work, but a pair with only one number, or a token containing letters, is rejected and listed back under the unreadable message rather than being coerced into a misleading zero.
Why are my exported charts different from the ones I designed elsewhere?
The Download SVG button writes a self-contained vector file containing the marker circles, the trend line where enabled, and your axis label captions. It does not reproduce grid lines, tick numbers, colours or fonts from other tools, because the exported file is deliberately minimal and portable. It is built to be dropped into a report, a slide or a publication figure and to scale without blurring, which is why the axis captions are baked in as real text rather than left behind on screen.
Is my data uploaded anywhere?
No. Parsing, plotting and the least squares fit all happen client-side in your browser, and nothing is sent to a server or stored after you close the tab. That makes the tool safe for incomplete, confidential or unpublished experimental data, and it also means the page keeps working on an offline machine once it has loaded.