To make an XY graph in Google Sheets, put your X values in one column and your matching Y values in another, select both columns, then choose Insert > Chart and set Chart type to Scatter chart. A scatter chart places each row at its numeric X and Y coordinates, making it useful for showing relationships, measurements, and trends. These steps are for Google Sheets in a web browser.
What You’ll Need
- A Google account and a spreadsheet open in Google Sheets.
- At least two columns of paired data: one for numeric X values and one for numeric Y values. Each row should represent one pair of measurements.
- Optional: a header for each column, such as Distance (X) and Temperature (Y), plus a clear idea of what the graph should show.
You do not need to install an add-on. If you are starting with data in another program, paste it into Sheets first and check that numbers have been imported as numbers rather than text.
Step-by-Step
- Arrange the paired data in two columns. Put the independent or input values in the left column and the measurements that correspond to them in the right column. For example, enter Time (seconds) in A1 and Distance (meters) in B1, then put each time and its measured distance on the same row. The X value in A2 must correspond to the Y value in B2; do not sort one column without sorting the other. Headers help you identify the axes and make the chart easier to read.
- Check the values and remove avoidable clutter. Confirm that the X and Y columns contain numeric values, not entries such as “about 5” or numbers with stray spaces. Use one row for each observation. Leave out explanatory notes within the selected range, and avoid blank rows between data pairs if you want the chart to be easy to configure. If some observations are incomplete, decide whether to correct or exclude them rather than pairing a value with the wrong row.
- Select the data range. Click the first header cell, then drag across both columns to the last data row. For example, if headers are in row 1 and observations are in rows 2 through 21, select A1:B21. Include the headers if you have them, but do not include unrelated columns or totals. If your data is in non-adjacent columns, it is usually simpler to copy the X and Y values into two neighboring columns first; this reduces the chance that Sheets assigns the wrong field to an axis.
- Insert a chart. With the range selected, open Insert > Chart. Google Sheets creates a chart and opens the Chart editor, usually in a panel on the right. The initial chart type may not be the one you want, so do not assume the first preview is an XY graph. If the Chart editor is closed, double-click the chart to reopen it.
- Choose Scatter chart. In the Chart editor, open the Setup tab and select the Chart type dropdown. Choose Scatter chart. The preview should show separate points positioned by the two numeric columns. A line chart or column chart is not the same thing: those chart types can treat the first column as categories, while a scatter chart uses numeric X coordinates.
- Check the X-axis field and data series. In Setup, look at the X-axis field and the Series list. The first column should be the X-axis values, and the second should appear as a data series supplying the Y values. If Sheets has chosen the wrong column, use the field controls in the editor to select the correct range, or adjust the chart’s data range and recheck the assignments. For a simple two-column XY chart, you generally want one X-axis range and one Y series.
- Confirm the header settings. If your selected range includes labels in its first row, make sure Use row 1 as headers is enabled in Setup. This helps Sheets use the column names rather than treating them as observations. If you did not include headers, turn that option off if Sheets is interpreting the first numeric pair as a label or omitting it from the chart. The exact options visible can depend on how the selected range is arranged.
- Add a chart title and axis titles. Open Customize > Chart & axis titles in the Chart editor. Use the Title type dropdown to choose Chart title, then enter a descriptive title in the title text box. Choose Horizontal axis title and enter what the X values measure, including units where useful. Then choose Vertical axis title and label the Y measurement. For example, “Distance over time” with “Time (seconds)” and “Distance (meters)” is more informative than a generic “Chart.”
- Format the axes if the default scale is not suitable. In Customize, open Horizontal axis or Vertical axis to review the available settings. You can set minimum and maximum values when you need a specific display range, such as showing a meaningful section of a measurement scale. Use bounds that fit the data and explain the graph honestly; a narrowed range can make small differences look larger. If a bound hides points, clear it or widen the range so every observation is visible.
- Review the finished chart and keep it easy to update. Check that the dots appear in sensible positions, the title and units are readable, and no points have been left out. Drag the chart to move it or use the corner handles to resize it. To edit it later, double-click it and change options in Setup or Customize. If you add more observations, check the data range in Setup; rows added beyond the existing range may not be included automatically.
Google Sheets uses a scatter chart for an XY graph. Excel also offers scatter charts, but its chart-insertion controls and chart formatting menus differ; the menu paths above apply to Sheets in a browser.
Common Mistakes
- Choosing the wrong chart type: A line chart may look similar but can treat X values as category labels instead of numeric positions. Select Scatter chart when the horizontal values are measurements or numbers with meaningful spacing.
- Reversing X and Y: If the points look unexpected, inspect the X-axis and Series fields. The X column determines horizontal placement; the Y series determines vertical placement.
- Misaligning pairs: Sorting only one column breaks the relationship between observations. Select the complete paired range before sorting, or use a filter that keeps each row together.
- Including headers as data: If a header is plotted as a point or the first observation disappears, review Use row 1 as headers and whether the selected range includes the header row.
- Using text instead of numbers: A value such as “10 kg” may be read as text, depending on how it is entered. Store numeric values in the cells and put the unit in the column header, or apply a number format.
- Adding unrelated columns: Extra fields can become unwanted series or affect the chart’s assignments. Select only the X and Y columns for a basic XY graph.
Tips
- Keep units visible. Put units in headers and axis titles, not inside each numeric cell. This preserves numeric values while making the measurement clear.
- Use a meaningful title. A short title should say what is being compared, not just identify it as a scatter chart. Include a date range or sample name if that context matters.
- Choose scales deliberately. Automatic axis bounds are convenient for an initial view. Set fixed bounds when you need to compare charts consistently, but use the same scale across charts being compared and avoid hiding relevant values.
- Make points easy to distinguish. Under Customize, open Series to review available series formatting, such as point appearance. If you add multiple Y series, use clear series names and make sure each series corresponds to the intended X values.
- Keep the source table tidy. One header row and one observation per row make chart setup clearer. A tidy table also makes it easier to filter, correct, or extend the data without confusing the chart.
- Use a trendline only when it helps. A trendline can summarize a pattern, but it does not prove that one variable causes another. Consider the data and the purpose of the graph before adding one; do not use a fitted line to imply certainty the observations do not support.
Troubleshooting
The chart is blank or has no visible points. Check that the selected range contains numeric values in both columns and that the X-axis and Series fields point to those cells. If values were imported, click a few cells and check whether they behave like numbers. Correct text-formatted entries, then verify the chart range and selected chart type.
The horizontal axis shows labels or equally spaced categories. Open Setup and change Chart type to Scatter chart. Then confirm that the numeric X column is assigned to X-axis. A chart that spaces observations evenly may be using a category-based chart type or the wrong X field.
The points appear in the wrong places. Compare a few chart points with their source rows. Confirm that each X and Y value is on the same row, and check that the columns have not been swapped. Also look for text values, blank cells, or an accidentally included totals row. If you sorted data, make sure the complete rows were sorted together.
One or more points are missing. Check whether the corresponding X or Y cell is blank or contains text, and make sure the chart’s data range reaches the row in question. Review any filters or hidden rows if the displayed data seems incomplete. If you appended observations after making the chart, update the range in Setup to include them.
The scale makes the pattern hard to see. Under Customize, review the relevant axis settings. Clear an unintended minimum or maximum, or set bounds appropriate to the values. Check whether one unusually large value is stretching the scale; if it is valid, do not remove it merely to make the remaining points look more dramatic. Instead, explain the scale or consider a separate view.
The title or axis labels will not appear. Open the chart by double-clicking it, then go to Customize > Chart & axis titles. Select the specific title type from the dropdown before entering its text. Chart title, horizontal axis title, and vertical axis title are separate settings.
Frequently Asked Questions
Is an XY graph the same as a scatter plot?
In this context, yes. A scatter chart plots paired numeric values as points, using one value for the horizontal coordinate and the other for the vertical coordinate. Google Sheets calls this chart type Scatter chart.
Can I make an XY graph with only one column?
Not a meaningful two-variable XY graph. You need paired X and Y values. If you only have one measurement column, you need another value for each observation, such as a time, distance, or sample number.
Can the X-axis values be dates?
Dates can be used as X values when Sheets recognizes them as dates. Format and check the source cells, then select Scatter chart and confirm that the horizontal axis uses the date column. If dates are stored as text, convert them to valid date values first.
How do I add another set of Y values?
Add the extra measurements in another column, with each row aligned to the same X value. In the chart’s Setup tab, add that column as another Series and check that the X-axis range remains correct. Give the new column a header so it is identifiable in the chart.
Will the chart update when I change a cell?
Changes to values within the chart’s selected data range generally appear in the chart. If you add new rows outside that range, the chart may not include them; edit the data range in Setup and extend it to cover the new observations.
Can I connect the points with a line?
A standard scatter chart emphasizes individual points. If you want to show an ordered path or connected measurements, review the available scatter chart options in Setup or consider whether a line chart better represents your data. Keep in mind that a line implies an order or continuity between observations.
Related
- Clear Cache and Cookies in Outlook: Step-by-Step
- How to Clear Cache Data in Outlook
- How to Create a Company Email Signature in Outlook
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Error Bars in Pivot Charts: Limits and WorkaroundsFor practical purposes, Excel PivotCharts are not a reliable place to add error bars, especially custom error bars…
- How to Create a Custom Column Chart in ExcelTo create a custom column chart in Excel for Microsoft 365 on Windows, arrange category labels and numeric…
- Excel Bar Graph Grouping: Create Clustered BarsTo group bars in Excel, arrange each group as a separate data series, select the category labels and…
- 3D Pie Chart in Excel: How to Create and Format ItTo create a 3-D pie chart in Excel for Microsoft 365 on Windows, select a two-column list of…
- How to Make a Pie Graph in Google Sheets: A Clear GuideTo make a pie graph in Google Sheets, put each category in one column and its numeric value…
- Excel Dashboard Software Alternatives and How to ChooseExcel dashboard software alternatives include Microsoft Power BI, Tableau, Looker Studio, Qlik Sense, Zoho Analytics, and Metabase. The…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.