5 Ways To Make a Scatter Plot in Excel

Are you wondering how to make a scatter plot in Excel? Follow along with this thorough tutorial to learn this must-have data visualization skill.

A scatter plot helps you to show the relationship between two sets of numerical or quantitative analysis values. It’s used abundantly to visualize scientific, engineering, and statistical data on an XY chart where both axes contain values.

Microsoft Excel offers multiple easy ways to draw and share scatter or xy plots. Follow along with this tutorial until the end to practice the easiest techniques to create 2D and 3D scatter plots.

Using the Quick Analysis Tool

Sample dataset 1

Suppose, you’d like to analyze the statistical relationship between the above dataset of store visitors and sales using an Excel scatter plot. You can use the Quick Analysis tool from the right-click menu. Alternatively, it’ll also show up if you select the input dataset in newer Excel editions, like Excel 2021, Excel 365, Excel for the web app, etc.

Quick Analysis tool icon
Quick Analysis tool icon

Let’s consider, you’re using Excel for Microsoft 365 desktop app. Open the worksheet containing the input data for the XY plot. Select the entire dataset. The Quick Analysis tool prompt will show up in the bottom right corner.

QA tool interface
QA tool interface

Click on the Quick Analysis tool icon or press Ctrl + Q to access the Quick Analysis tool user interface.

Scatter plot Excel button
Scatter plot Excel button

Now, navigate to the Charts tab and click on the Excel Scatter plot button.

Default scatter plot in Quick Analysis tool
Default scatter plot in Quick Analysis tool

Excel will automatically insert a scatter chart with default settings (Bounds, Units, and Label Position) for the X and Y axes. The XY chart also includes an automatic line for easier comparison of two sets of values.

A drawback of this method is the Quick Analysis tool isn’t available on earlier Excel editions like Excel 2010, Excel 2007, etc.

Using the Insert Scatter or Bubble Chart Command

The default location for all chart tools including Excel scatter plot is the Charts commands block of the Insert tab.

If you’re using Excel 2013 or newer, you’ll get the Recommended Charts command button. It takes you to an elaborate list of XY plots.

Creating a scatter plot from Charts block
Creating a scatter plot from Charts block

So, select the target dataset and click on the Insert Scatter drop-down menu. Choose any of the following scatter chart types:

  • Scatter (only markers)
  • Scatter with Smooth Lines and Markers
  • Scatter with Smooth Lines
  • Scatter with Straight Lines and Markers
  • Scatter with Straight Lines
Scatter with Smooth Lines and Markers
Scatter with Smooth Lines and Markers

I picked the Scatter with Smooth Lines and Markers option. You can see the result above.

Sample dataset with three sets of values
Sample dataset with three sets of values

If there’s a third set of values to be plotted in the same graph, you can try the bubble chart style as well. It’s available in Insert > Insert Scatter > Bubble.

Bubble charts

You can choose from any of the following two bubble chart models:

  • Bubble
  • 3D Bubble
Bubble chart from Scatter chart menu
Bubble chart from Scatter chart menu

For instance, if I create a bubble chart for the above dataset, the values in the Sales and Visitors columns will be used to plot the markers for the Y and X axes. The Profits column values will define the bubbles’ diameters in the chart.

Using a Keyboard Shortcut

The default chart
The default chart

After selecting the target dataset, press Alt + F1 to insert the default column chart in the active worksheet.

Change Chart Type command
Change Chart Type command

Click on the chart populated by Excel to access the Chart Design tab in the ribbon.

Click on the Change Chart Type command button in the Type block.

Change chart type dialog
Change Chart Type dialog

The Change Chart Type dialog box will show up with All Charts as the selected tab.

Click on the left-side navigation panel’s X Y (Scatter) category.

Switch to Scatter plot
Switch to Scatter plot

On the right side, you should see the preview of the default scatter model with only markers.

You can change the scatter plot type on the top and choose an appropriate graph from the preview. Click OK to apply the changes you’ve made.

Changed column to scatter
Changed column to scatter

Excel will change the column chart to scatter plot instantly.

Adding a New Data Series

Existing scatter chart with two data series
Existing scatter chart with two data series

Suppose, you already have the above scatter plot in your Excel worksheet.

If you wish to add a third set of values in the same chart, select the existing graph.

Include new data series
Include new data series

Paste the new data series in column C or any other column to the right of the existing dataset.

Right-click for Select Data
Right-click for Select Data

Right-click on it and choose Select Data from the context menu.

The Select Data Source dialog box will pop up.

Delete cell range in Chart data range
Delete cell range in Chart data range

Delete the existing cell range reference of the Chart data range field.

Choose new cell range
Choose new cell range

Select the new cell range from the worksheet. Click OK save.

Two sets of markers
Two sets of markers

You should now see two sets of markers on the scatter chart.

Click on the chart again and select Change Chart Type from the Type commands block in the Chart Design tab.

Choose Scatter for all data series
Choose Scatter for all data series

Choose Combo from the left-side navigation pane in the Change Chart Type dialog.

You should see the series names and corresponding chart types on the right-side preview pane.

Click on the drop-down menus for both the series and choose Scatter.

Checkmark Secondary Axis
Checkmark Secondary Axis

Checkmark the checkbox for Secondary Axis for any of the data series. For example, checking the Secondary Axis for Profits would show as the additional series axis labels on the right side of the chart.

Scatter plot with multiple data series
Scatter plot with multiple data series

The final chart will look like the one shown above.

📒 Read More: 6 Ways to Add a Secondary Axis in Microsoft Excel

Using Excel VBA

You can also create the default or a custom scatter plot using the Excel VBA tool. It doesn’t require you to go through VBA programming courses. Just use the scripts I’ve shared below to create cool VBA macros that can magically insert XY plots.

Firstly, follow along with the tutorial below to learn the techniques to create a VBA macro using a VBA program code:

📒 Read More: How To Use The VBA Code You Find Online

If you’re ready, check out the scripts and their functions outlined below

Default Scatter Plot in Excel Using VBA

The following script lets you create the default scatter plot. It’s similar to the one you create using the Quick Analysis tool or the Insert Scatter command in the Excel ribbon menu.

VBA Script 1
Sub CreateScatterPlot()
    Dim YRange As Range
    Dim XRange As Range
    Dim ChartTitle As String
    Dim AddAxisTitles As Boolean
    Dim XAxisTitle As String
    Dim YAxisTitle As String
    Dim MyChart As ChartObject
    
    ' Select Y-axis data series
    On Error Resume Next
    Set YRange = Application.InputBox("Select Y-axis data series:", Type:=8)
    On Error GoTo 0
    If YRange Is Nothing Then Exit Sub
    
    ' Select X-axis data series
    On Error Resume Next
    Set XRange = Application.InputBox("Select X-axis data series:", Type:=8)
    On Error GoTo 0
    If XRange Is Nothing Then Exit Sub
    
    ' Custom chart title
    If MsgBox("Do you want to add a custom chart title?", vbYesNo) = vbYes Then
        ChartTitle = InputBox("Enter custom chart title:")
    End If
    
    ' Axis titles
    If MsgBox("Do you want to add axis titles?", vbYesNo) = vbYes Then
        AddAxisTitles = True
        XAxisTitle = YRange.Cells(1, 1).Value
        YAxisTitle = XRange.Cells(1, 1).Value
    End If
    
    ' Create the chart
    Set MyChart = ActiveSheet.ChartObjects.Add(Left:=100, Width:=375, Top:=75, Height:=225)
    With MyChart.Chart
        .ChartType = xlXYScatter
        .SetSourceData Source:=Union(XRange, YRange)
        .HasTitle = True
        .ChartTitle.Text = ChartTitle
        If AddAxisTitles Then
            .Axes(xlCategory, xlPrimary).HasTitle = True
            .Axes(xlCategory, xlPrimary).AxisTitle.Text = XAxisTitle
            .Axes(xlValue, xlPrimary).HasTitle = True
            .Axes(xlValue, xlPrimary).AxisTitle.Text = YAxisTitle
        End If
    End With
End Sub
Running a macro
Running a macro

After creating the macro, press Alt + F8 to launch the Macro dialog box.

There, select the CreateScatterPlot macro and hit Run.

The VBA script will start populating a series of input boxes and confirmation pop-ups to guide you through entering data and formatting the output chart. Find below the pop-ups and their functionalities:

Input box for Y axis
Input box for Y-axis
  • Use your mouse to select the data series column for the Y axis.
Input box for X axis
Input box for X-axis
  • An input box so you can enter the X-axis values by selecting the column using a mouse.
Custom chart title
Custom chart title
  • If you wish to add a custom chart title, click Yes in this notification box.
Entering a custom title
Entering a custom title
  • This is the input box where you should type in the chart title.
Prompt for axis titles
Prompt for axis titles
  • Click Yes if you want to add axis titles. Excel will use the column headers to populate the titles.
Excel scatter plot using VBA
Excel scatter plot using VBA

Find above a scatter plot created using this VBA script.

Plotting Three Sets of Data Series

You can create a Combo scatter chart using three sets of data series using the following script:

VBA script 2
Sub CreateComboScatterPlot()
    Dim oChartObj As ChartObject
    Dim oChart As Chart
    Dim rXValues As Range
    Dim rSeries1 As Range
    Dim rSeries2 As Range
    
    ' Show input boxes to select data ranges
    Set rXValues = Application.InputBox("Select X-axis data range:", Type:=8)
    Set rSeries1 = Application.InputBox("Select first data series range:", Type:=8)
    Set rSeries2 = Application.InputBox("Select second data series range:", Type:=8)
    
    ' Create a new chart
    Set oChartObj = ActiveSheet.ChartObjects.Add(Left:=10, Top:=10, Width:=600, Height:=300)
    Set oChart = oChartObj.Chart
    
    ' Set chart type for series
    oChart.ChartType = xlXYScatter
    oChart.SeriesCollection.NewSeries
    oChart.SeriesCollection(1).XValues = rXValues
    oChart.SeriesCollection(1).Values = rSeries1
    oChart.SeriesCollection(1).MarkerStyle = xlMarkerStyleCircle ' Set marker style for series 1
    
    oChart.SeriesCollection.NewSeries
    oChart.SeriesCollection(2).XValues = rXValues
    oChart.SeriesCollection(2).Values = rSeries2
    oChart.SeriesCollection(2).MarkerStyle = xlMarkerStyleSquare ' Set marker style for series 2
    
    ' Add secondary axis for the second series
    oChart.ApplyCustomType ChartType:=xlXYScatter
    oChart.SeriesCollection(2).AxisGroup = 2
    
    ' Add secondary axis labels
    oChart.Axes(xlValue, xlSecondary).HasTitle = True
    oChart.Axes(xlValue, xlSecondary).AxisTitle.Text = "Secondary Y-axis"
    
    ' Add a chart title
    oChart.HasTitle = True
    oChart.ChartTitle.Text = "Combo Scatter Plot"
    
    ' Display the chart
    oChartObj.Select
End Sub

When you execute the VBA macro created from the above script, a cascade of pop-ups will walk you through the process. I’ve listed these below:

Select X-axis values
Select X-axis values
  • Use your mouse cursor to choose the data column for the X-axis.
Selecting first data series
Selecting the first data series
  • In the next prompt, you’ll need to enter the cell range for the first data series.
Selecting second data series
Selecting the second data series
  • Similarly, enter the cell range for the second data series in the third prompt.
Creating Excel scatter plot using multiple datasets
Creating Excel scatter plots using multiple datasets

Excel VBA will populate the scatter chart as instructed.

Useful Customizations for a Scatter Plot

You might need to customize various technical elements of the scatter chart using the Format Chart Area navigation pane.

Format Chart Area
Format Chart Area

Firstly, you must click on the chart to get the Format Chart Area tool. It should be on the right.

Horizontal (Value) Axis
Horizontal (Value) Axis

Click the Chart Options drop-down menu and choose Horizontal (Value) Axis.

Format Axis
Format Axis

Go to the Axis Options menu and expand the Axis Options list of items.

From here, you can modify the Bounds and Units to make the chart axis labels relevant to the markers.

Example chart
Example chart

For example, in the above chart, the markers are far away from the axis cross sections because Bounds and Units haven’t been customized appropriately.

Editing Bounds for X axis
Editing Bounds for X-axis

So, changing the Bounds Minimum to 1,500 points should fix the spread of the X-axis.

Editing Bounds for Y axis
Editing Bounds for Y-axis

Similarly, you can adjust the Bounds of the Y-axis. Just navigate to the Vertical (Value) Axis menu in the Format Axis navigation panel. Then, follow the same steps to edit Bounds Minimum from Axis Options.

Enable Trendline
Enable Trendline

To add a trendline and its equation, click on the chart to get the Chart Elements button. It’s the Plus (+) sign in the top right corner.

Click Chart Elements and checkmark the check box for Trendline.

Trendline equation
Trendline equation

Now, double-click on the trendline to open the Format Trendline navigation panel. Select the following options:

  • Display Equation on chart
  • Display R-squared value on chart

Conclusions

So far, you’ve learned and practiced the best methods to make a scatter chart in Microsoft Excel.

In addition, you’ve learned how to customize a scatter plot to fit your data visualization requirements.

Which method would you like to recommend? Comment below!

About the Author

Tamal Das

Tamal Das

I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃