To change the X and Y data in an Excel scatter plot, select the chart, choose Chart Design > Select Data, select the series, and click Edit. Set the desired cell range in Series X values and Series Y values, then click OK. This changes which values Excel plots on each axis; formatting the axes is a separate step.
Change the X and Y data in a scatter plot
In Excel for Microsoft 365 on Windows, the chart’s series settings determine which cells supply the horizontal and vertical coordinates. Follow these steps:
- Click the scatter plot. If the chart is selected, the contextual Chart Design tab appears on the ribbon.
- Choose Chart Design > Select Data. The Select Data Source dialog lists the chart’s series.
- Select the series you want to change, then click Edit. A scatter chart may contain one series or several.
- In the Edit Series dialog, enter or select the cell range for Series X values, then enter or select the range for Series Y values.
- Click OK to close the Edit Series dialog, then click OK again to close Select Data Source.
For example, if column A contains hours studied in A2:A11 and column B contains test scores in B2:B11, use A2:A11 for X and B2:B11 for Y. Leave the column headings out of the value ranges. The two ranges should contain the same number of data points, so Excel can pair each X value with the Y value on the same row. If the chart has multiple series, edit each series separately and check that each one uses the intended ranges.
You can select ranges by clicking the range-selection button beside a field, highlighting the cells on the worksheet, and confirming the selection. If the dialog is in the way, it may shrink while you select cells. You can also type a sheet-qualified range, such as a reference to cells on another worksheet, provided the cells belong to the workbook.
How Excel uses scatter-plot data
An XY scatter chart plots paired numeric values as coordinates: each observation has an X value and a Y value. Excel places the point according to those two numbers, rather than treating every horizontal position as an equally spaced category. That makes a scatter plot useful when the distance between X values matters, such as plotting a measurement against time, distance, temperature, or price.
With a simple two-column selection, Excel commonly uses the first column as X and the second as Y. If you select a first column of dates or measurements followed by several numeric columns, Excel may create one series for each later column, using the first column as the shared X data. Check the series settings rather than relying on the initial guess, especially if headings, blank cells, or an unusual table layout are involved.
For instance, in a chart of hours studied against test scores, the horizontal coordinate should represent hours and the vertical coordinate should represent scores. If the points look plausible but the chart’s meaning is backward, the values may simply be assigned to the opposite fields. The data itself has not been altered by editing the chart’s series; the change tells the chart which ranges to display.
Swap the axes or change the plotted variables
To swap X and Y, edit the series and put the original Y range in Series X values and the original X range in Series Y values. The points will be plotted with their coordinates reversed. This is different from turning on a setting that merely reverses the direction of an axis: swapping the data changes the coordinates, while reversing an axis changes which end of its scale appears on the left, right, top, or bottom.
Do not assume Switch Row/Column will swap the axes of an XY chart. That command changes how Excel groups data into series, and it may not produce the desired X/Y assignment for a scatter plot. Use Select Data and edit the series fields when you need to control the coordinate ranges directly.
Before swapping, consider what the chart is meant to communicate. If the question is whether one measurement changes with another, either variable can sometimes be placed on the horizontal axis, but convention and the purpose of the analysis matter. Keep the original layout if readers expect a particular variable on X, and label both axes clearly after making a change. Swapping coordinates can alter the chart’s visual shape and the meaning of any trendline equation shown on it.
Change the axis scale, limits, and direction
If the data is assigned correctly but the chart looks compressed or misleading, change the axis settings rather than the series ranges. Right-click the horizontal axis and choose Format Axis to open the formatting pane. Under Axis Options, you can set the minimum and maximum bounds and, where available, the major unit. Repeat the process for the vertical axis to adjust its scale separately.
- Bounds: Set a minimum or maximum when you need a focused view of part of the data. Select or restore the automatic setting when you want Excel to choose the limits.
- Major unit: Change the spacing of the main tick marks and gridlines to make a scale easier to read. A smaller interval adds more labels and gridlines; a larger one reduces them.
- Logarithmic scale: This can help display values spread across several orders of magnitude. A logarithmic axis cannot represent zero or negative values, so check the data before selecting it.
- Values in reverse order: This changes the displayed direction of an axis. It does not exchange the X and Y ranges.
- Axis crosses: The crossing options control where the horizontal and vertical axes meet. They affect the chart’s layout, not the values in the series.
Use bounds carefully. For example, a vertical scale that begins well above zero can make modest differences between points look dramatic. A nonzero minimum can be appropriate when the purpose is to examine variation within a narrow range, but make the limits visible and avoid implying a larger effect than the data supports. If a chart suddenly appears empty after entering bounds, one or more values may fall outside the displayed range; restore automatic bounds or widen the limits.
Check the chart type and the source data
A common source of confusion is using a line chart when the intended chart is an XY scatter plot. A line chart generally spaces its horizontal categories evenly; an XY scatter chart positions points using numeric X values. To change an existing chart, select it and choose Chart Design > Change Chart Type, then choose an option under X Y (Scatter). Select the scatter style that fits the display you want, such as markers only or markers connected by lines.
If the horizontal axis shows 1, 2, 3 instead of the values you expected, open Select Data and inspect the series’ X range. Excel may be using point positions because the X values were not assigned as intended, or the current chart may be a line chart. Check that the intended cells contain usable numeric values. Text that looks like a number, blank cells, and inconsistent entries can interfere with plotting; dates are numeric values in Excel, though their display can be formatted as dates.
Also verify that the X and Y ranges are aligned row by row. If the X range starts at row 2 but the Y range starts at row 3, Excel pairs unrelated observations. Use ranges with matching counts and corresponding records in the same order. If your data contains headers, exclude them from the coordinate ranges and use the series name field or worksheet heading to identify the series.
Format axis labels and make the chart readable
After correcting the series, add titles so readers know what each axis measures. Select the chart and choose Chart Design > Add Chart Element > Axis Titles, then add the primary horizontal and primary vertical titles. Click each title in the chart and type a descriptive label with units where relevant, such as “Hours studied” and “Test score (points).” A clear title can prevent a correctly plotted chart from being misread.
To change how the tick labels look, right-click an axis and choose Format Axis. The pane includes number-formatting options, which are useful for displaying dates, percentages, currency, or an appropriate number of decimal places. Formatting changes how values appear, not the underlying X or Y data. For example, a value displayed as a date may still be stored as a serial number.
Consider the amount of information shown. If labels overlap, widen the chart, reduce unnecessary decimal places, or adjust the major unit. Gridlines can help readers estimate values, but too many make a chart busy. For a chart with several series, use distinct marker styles or colors and a useful legend. Do not rely on color alone if the chart may be printed in grayscale or viewed by someone with color-vision differences.
Windows, Mac, and Excel for the web
The steps above are for Excel for Microsoft 365 on Windows. In Excel for Microsoft 365 for Mac, select the chart and use the Chart Design tab and Select Data command to edit the series; ribbon placement can vary with the window size and Excel build. The series fields are still the key place to assign X and Y ranges. To format an axis on Mac, select or right-click the axis and open its formatting options.
Excel for the web has chart-editing capabilities, but the available commands and dialog layout can differ from the desktop application, and some detailed chart controls may not be available in every web experience. If you cannot find the series X and Y fields or the bounds you need, open the workbook in the desktop Excel app and make the change there. The chart remains part of the workbook, so save the workbook after editing and confirm that the chart reflects the intended ranges.
Frequently Asked Questions
How do I switch the X and Y axes in an Excel scatter plot?
Select the chart, choose Chart Design > Select Data, select the series, and click Edit. Put the current Y range in Series X values and the current X range in Series Y values. Click OK to apply the change.
Why does my scatter plot show 1, 2, 3 on the X-axis?
Excel may be using point order instead of the intended X values, or the chart may be a line chart. Check that the chart type is X Y (Scatter), then use Select Data to assign the correct numeric cells to Series X values.
Can I change the scale without changing the data?
Yes. Right-click the axis, choose Format Axis, and adjust its bounds, major unit, or direction under Axis Options. These settings change the view of the chart; they do not edit the worksheet data or exchange the series’ X and Y ranges.
Why can’t I edit the X and Y values?
Confirm that the chart is selected and that you are editing a scatter series in the desktop app. In Chart Design > Select Data, select the series and choose Edit. If you are using Excel for the web and the needed controls are missing, open the workbook in desktop Excel.
Do the X and Y ranges have to be the same size?
Yes. Each plotted point needs one X value and one corresponding Y value, so use ranges with the same number of entries and matching row order. Exclude headings from both ranges to avoid treating text labels as coordinate values.
Related
- Excel: Protect a Sheet but Keep Slicers Usable for Users
- Excel Protect Sheet but Allow Data Refresh?
- Excel Protect Sheet but Allow Filtering: How to Set It Up
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Shortcut to Insert Copied CellsIn Excel for Microsoft 365 on Windows, copy the cells with Ctrl+C, select the destination, and press Ctrl+Shift++…
- Excel Not Responding Due to Large Data: Causes and FixesYes. Excel can show “Not Responding” when a large workbook takes a long time to calculate, load, refresh,…
- Pokémon Card Inventory Spreadsheet: What to TrackA useful Pokémon card inventory spreadsheet records each card’s identity, condition, quantity, purchase details, and storage location; in…
- Find Duplicate Values in Excel: Step-by-Step GuideTo find duplicate values in Excel, select the cells you want to check, then choose Home > Conditional…
- Remove Both Duplicates in Excel: Keep One or Remove All Rows?Excel’s Remove Duplicates command does not remove both copies of a repeated entry: it keeps the first matching…
- Create a Filter View in Google Sheets: Steps & TipsTo create a filter view in Google Sheets, open the spreadsheet in a desktop web browser, select a…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.