In Excel, an x-y chart is usually an XY (scatter) chart: select paired numeric x and y values, then choose Insert > Insert Scatter (X, Y) or Bubble Chart and pick a scatter style. Use it when the horizontal values are numbers and their spacing matters; choose a line chart when the horizontal axis represents categories or evenly spaced periods.
What an x-y chart means in Excel
An x-y chart plots each observation as a coordinate. The x value determines the point’s horizontal position, and the y value determines its vertical position. For example, if a worksheet records hours of study and test scores, hours can be the x variable and scores the y variable. A scatter chart puts the paired values on two numerical axes, making it possible to see whether one variable tends to rise or fall as the other changes.
Excel’s chart name for this is XY (Scatter). “X-Y chart” is a common informal name, while “scatter chart” or “scatter plot” is the name used in Excel’s Insert menu. The chart can show just markers, markers connected by straight lines, or lines without markers. A bubble chart is a related option that adds a third value to control each point’s size.
The key difference from many other Excel charts is that both axes of a scatter chart are value axes. Excel uses the actual numerical x values to position the points. If the x values are 1, 2, and 10, the point at 10 is placed much farther from 2 than 2 is from 1. A line chart, by contrast, usually spaces its category labels equally, even if the labels happen to look like numbers.
When to use a scatter chart instead of a line chart
Choose a scatter chart when each y measurement belongs to a specific numeric x measurement, and the distance between x values carries meaning. It is commonly useful for measurements, experiments, comparisons, and relationships between two quantities. Examples include temperature against time, engine speed against fuel use, product price against units sold, or a person’s height against weight.
A line chart is often better for monthly totals, daily website visits, or sales by quarter when the main purpose is to show a sequence over time. It treats the horizontal labels as categories and normally gives each label an equal position. That can make the sequence easier to read, but it does not show unequal gaps accurately. If readings were taken on January 1, January 2, and January 20, for instance, a line chart may give the dates equal category spacing; a scatter chart can represent the longer interval before January 20.
- Use scatter: x values are numeric measurements, may be irregularly spaced, or need to be treated as a continuous scale.
- Use line: x values are labels or ordered categories, and equal spacing between categories is appropriate.
- Check the purpose: a chart can be technically valid but misleading if its axis type does not match the question you are trying to answer.
Arrange the worksheet data correctly
Put each x-y pair on the same row. For a basic chart, enter a heading such as Hours in A1 and Score in B1, then place the hours in A2:A5 and their corresponding scores in B2:B5. The first column contains x values; the second contains y values. For example, the rows might be 0 hours and 52 points, 1 hour and 61 points, 2 hours and 74 points, and 3 hours and 82 points. Each row is one observation, so do not sort one column independently of the other.
Keep the data in a simple rectangular range, with one header row and numeric values below it. Blank rows within the data can interrupt a series or create gaps. Text such as “about 5” or a number stored as text may not plot as expected, so check that values intended for either axis are real numbers. If a value is missing, do not substitute zero unless zero is the actual measurement; a zero can create a false point far from the rest.
If you want several sets of y values against the same x values, put the shared x values in the first column and each y series in its own column, with a separate heading for each series. For example, a time column followed by “Room A” and “Room B” lets you compare both readings against the same time scale. If each series has different x values, it is often clearer to use separate x-y column pairs for each series and verify the assignments in the chart’s data settings.
Create an x-y chart in Excel
- Select the two-column data range, including its headings. For the example above, select A1:B5.
- On the ribbon, choose Insert > Insert Scatter (X, Y) or Bubble Chart.
- Choose a chart style. Scatter displays markers without connecting lines and is a good starting choice when observations are separate. The other scatter options connect points with straight or smooth lines, with or without markers.
- Click the chart, then use the Chart Design and Format tabs to adjust its appearance. Add a descriptive title and axis titles so readers know what each variable and unit represents.
Excel normally interprets the first selected column as x values and the next as y values for a two-column scatter chart, but it is worth checking the result. The horizontal axis should show the x measurement, not the row numbers or a repeated series of categories. On Excel for Mac, the Insert tab also provides scatter-chart choices; the ribbon layout can differ slightly from Windows. Excel for the web has chart insertion and formatting tools too, though some advanced editing controls may be more limited than in the desktop application.
Set the x and y ranges for each series
If Excel assigns the wrong data, or if the chart has multiple series, select the chart and choose Chart Design > Select Data. In the Select Data Source dialog, select a series and choose Edit. The series settings provide separate fields for the series name, the X values, and the Y values. Set each field to the intended worksheet range, then confirm the changes. The x and y ranges for a series must contain matching numbers of observations.
This is also useful when the x and y columns are not next to one another, or when the chart was created from an arrangement Excel did not interpret as intended. For two series that share one x column, assign that same x range to both series, but give each series its own y range. If the series use different x measurements, assign the appropriate x range separately for each one. A heading can identify a series in the legend, but a legend does not replace axis titles.
When selecting nonadjacent ranges, editing the series is generally more reliable than trying to select separated cells before inserting the chart. After editing, inspect the chart: a series that has accidentally used text labels or the wrong numeric column may appear as a vertical stack, a horizontal line, or points in an implausible region.
Format axes and make the pattern readable
Add axis titles that include units, such as “Time (minutes)” and “Distance (meters).” A chart title such as “Distance traveled over time” tells readers what the comparison is about. To add titles in desktop Excel, select the chart and use Chart Design > Add Chart Element > Axis Titles, then choose the horizontal or vertical title. The exact controls may be arranged differently in Excel for Mac, but chart elements are available from its chart design tools as well.
To change the displayed scale, right-click an axis and choose Format Axis. You can set bounds, units, number formats, and other axis options in the formatting pane. A narrower range can make small differences easier to see, but it can also exaggerate those differences. Starting the y-axis at zero is not mandatory for every scatter plot, particularly when the goal is to examine variation within a narrow measurement range; however, state or show the chosen scale clearly and avoid using it to imply a larger effect than the data support.
Use markers when individual measurements matter. Connecting lines can help when the x values represent a continuous sequence and connecting neighboring observations is meaningful, but they can suggest continuity or an order that does not exist. A smooth-line option changes the visual interpolation between points; it does not add measurements or establish that the relationship follows a smooth curve. Keep colors and gridlines restrained enough that the points remain easy to distinguish.
Common problems and how to fix them
- The x-axis shows 1, 2, 3 instead of the intended values: edit the series through Chart Design > Select Data and assign the actual numeric x range. Confirm that the selected chart type is XY (Scatter), not a line chart.
- Points appear in the wrong direction or in an unexpected cluster: check that the x and y ranges have not been reversed, and that each x value still matches the y value in its row.
- Some points are missing: inspect the source cells for blanks, text-formatted numbers, or errors. Make sure the selected ranges include all intended rows and do not include unrelated totals.
- The chart connects points in a confusing order: scatter charts do not automatically make a line mean “time order.” If connected points should follow increasing x, sort complete rows by x value, keeping every measurement in its row. Do not sort the x column alone.
- The relationship looks stronger than expected: inspect the axis bounds and units. A tightly cropped scale can emphasize small changes; the plotted data are the same, but the visual impression changes.
Frequently Asked Questions
Is an Excel x-y chart the same as a scatter plot?
Usually, yes. Excel calls the chart type XY (Scatter), and it plots paired values on numeric horizontal and vertical axes. “X-y chart” describes how the variables map to those axes; “scatter plot” is the standard chart name.
How do I put two data sets on one x-y chart?
Create or select a scatter chart, then open Chart Design > Select Data and add or edit a series. Enter the x range and y range for each set. If both series use the same x values, use the same x range for each and a different y range.
Can the x-axis show dates?
Yes. Excel stores dates as numbers, so a scatter chart can position dates according to their actual time intervals. Format the axis labels as dates if necessary. A line chart may be more suitable if dates are simply category labels and equal spacing is intended.
Why does my scatter chart show only one point or no points?
Check that the selected x and y ranges contain numeric values, have the same number of observations, and include the rows you expect. Also confirm that the chart is an XY (Scatter) chart and that the series has not been assigned an empty or incorrect range.
Should I connect the points?
Connect points when the order and path between observations communicate something meaningful, such as measurements over time. Leave them unconnected when the observations are independent or when a line might imply unmeasured values between points. The choice changes presentation, not the underlying data.
Related
- Excel Template for a Social Media Calendar
- Excel Job List Template: Track Applications and Follow-Ups
- Excel To-Do List Templates: How to Choose and Use One
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Line Chart Comparing Two Years: A Clear SetupTo make an Excel line chart comparing two years, put the shared time periods in the first column…
- Org Chart in PowerPoint: Best Ways to Build OneFor most teams, the best way to make an org chart in PowerPoint is to use SmartArt: choose…
- Excel Stacked Bar Chart: Change Series Order EasilyTo change the series order in an Excel stacked bar chart, select the chart and choose Chart Design…
- Excel Line Chart Zero Values: What to ChangeExcel plots a numeric zero as a real data point, so a line chart will show it on…
- Create a Pivot Table in Excel: Steps and Tips That WorkTo create a PivotTable in Excel for Microsoft 365 on Windows, select a cell in a well-organized data…
- Wrap Text in Excel Chart X-Axis Labels: Step-by-StepTo wrap text in Excel chart x-axis labels, add a line break to the category label in the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.