What an x y graph shows
An x y graph has two number lines: x runs across and y runs up. Every row of your table is one point. Its x value sets how far right the point sits, and its y value sets how high. The sample graph plots 12 pairs, from (1, 2) up to (12, 14), and joins them with a line.
Put the value you choose or control on x, and the value you measure on y. Minutes of heating go on x and temperature on y. Ad spend goes on x and signups on y.
Is an xy graph the same as a scatter plot?
Yes. An x y graph, an xy graph and a scatter plot all place points by two numbers, so an xy graph maker and a scatter plot maker are the same kind of tool. This page is the plain version of the Chartjuice scatter plot maker: the same designer, opened on a bare two-column table with the points joined and no trend line. Go there for correlation and colored groups, or to the bubble chart maker to size each point by a third number.
Points, connected points or a line of best fit?
Above the chart, choose how to draw your data:
- Points places a dot for each pair and nothing else. Use it when the order of the points means nothing, such as the height and weight of each student in a class.
- Connected joins the points in order from the smallest x to the largest. Use it when each x follows the one before it, such as readings taken over time or a curve worked out from an equation.
- Best fit draws one dashed straight line through the middle of all the points, to show the trend. See "Add a trend line" below.
The graph opens on Connected. Each point stays at its real x value, so if your x values are 1, 2 and 10, the gap from 2 to 10 is eight times as wide as the gap from 1 to 2. Your rows can be in any order, because the line goes by x and ignores the order of the table. If a Group column is set, each group gets its own line in its own color. The same settings are in the Style tab under Scatter options, as Connect points and Trend line, and you can turn both on at once.
The line graph maker also joins points, but it treats the x column as labels and spaces them evenly. That is right when x goes up in equal steps or names things, like Jan, Feb and Mar. When your x values are uneven numbers, use this graph so each point sits where its number says.
Graph an equation from a table of values
To graph an equation, build a table of values and plot the pairs. Take y = 2x + 1. Choose x values, work out y for each, and you get:
| x | y |
|---|---|
| -3 | -5 |
| -2 | -3 |
| -1 | -1 |
| 0 | 1 |
| 1 | 3 |
| 2 | 5 |
| 3 | 7 |
Paste the two columns and the seven points fall on a straight line, with the joining line running through all of them. For a curve such as y = x², use more x values, closer together, so the joined line bends with the curve. With only a few points it turns into a row of straight pieces.
Negative values plot where they belong. The axes sit along the bottom and left edges of the graph, though, not through the origin, so you won't get a four-quadrant grid with the axes crossing at (0, 0). To add vertical gridlines, turn on Gridlines under Horizontal axis.
Add a trend line
Pick Best fit above the chart, or open the Style tab, expand Scatter options and turn on Trend line. Chartjuice draws a dashed straight line through the middle of the points. It is a different thing from the joined line: Connect points goes from each point to the next, while the trend line is the one straight line that fits all of them best. You can show both. Turn on Show R² and the legend says how closely the points follow it, from 0 to 1.
Plot the y = 2x + 1 table above and the line runs through all seven points, with R² at 1.00. Plot y = x² for x from -3 to 3 and R² drops to 0.00: the points make a clear U, but no straight line follows a U.
Read a trend line with care. One point far from the rest can tilt it, and a line that fits well still doesn't say that x causes y.
Make the points easier to read
Under Scatter options, Point size makes the dots bigger and Point shape swaps circles for squares, triangles or diamonds. Lower Opacity when points overlap, so a pile of them looks darker than a single point.
Both axes fit your data, so they may not start at zero. Set Min to 0 under Horizontal axis or Vertical axis when the graph should include the origin.
Ask AI to set it up
Click Ask AI and type something like "add a trend line and title the axes Time and Distance", or "show the points without the line". The assistant changes the same settings you would by hand, so you can adjust anything afterward. It sees your column names and a small sample of the rows, not the whole file.






