How to Add a Vertical Line to a Scatter Plot in Excel – 2 Methods

This is the sample dataset.


Method 1 – Using Error Bars to Add a Vertical Line to a Scatter Plot in Excel

Steps

  • Select B5:C11.

  • Go to the Insert tab.
  • In Charts, select Scatter Chart.

  • Select the Scatter chart shown below:

The following chart is displayed:

Add Vertical Line to Scatter Plot in Excel

  • To modify the chart, click the plus sign (Chart Elements).
  • Add Axes and Axis Title to the chart:

You can modify the Chart Style by clicking the Brush sign.

Add Vertical Line to Scatter Plot in Excel

This is the output.

Add Vertical Line to Scatter Plot in Excel

  • Right-click the chart.
  • Click Select Data.

Add Vertical Line to Scatter Plot in Excel

  • In the Select Source Data dialog box, in Legend Entries (Series), click Add.

  • In the Edit Series dialog box, set the Series name, Series X values, and Series Y values.
  • Click OK.

Add Vertical Line to Scatter Plot in Excel

  • In the Select Data Source dialog box, click OK.

The point of the student whose roll number is 4 has a different color:

Add Vertical Line to Scatter Plot in Excel

  • Click that point.

Add Vertical Line to Scatter Plot in Excel

  • In Chart Design, select Chart Layouts.
  • Choose Add Chart Element .

  • Select Error Bars.
  • Select Percentage.

Add Vertical Line to Scatter Plot in Excel

Horizontal and vertical percentage lines will be created on the point.

Add Vertical Line to Scatter Plot in Excel

  • In Error Amount, set the Percentage to 0.

The horizontal line is removed:

Add Vertical Line to Scatter Plot in Excel

 

  • Right-click the vertical line on the point.
  • Select Format Error Bars.

  • In the Format Error Bars dialog box, in Vertical Error Bar, set the direction as Both (the error bar will show in both directions).
  • In Error Amount, set the Percentage to 100.

Add Vertical Line to Scatter Plot in Excel

This is the output.

You can change the color and width of the vertical line in Format Error Bars:

  • Go to Fill & Line.
  • In Line, change the Color and Width.

This is the final output.

Add Vertical Line to Scatter Plot in Excel

Read More: How to Add Line to Scatter Plot in Excel


Method 2 – Adding a Vertical Line to a Scatter Plot Using Excel Shapes

Steps

  • Select B5:C11.

  • Go to the Insert tab.
  • In Charts, select Scatter Chart.

  • Select the first Scatter chart.

The following chart is displayed:

Add Vertical Line to Scatter Plot in Excel

  • To modify the chart, click the plus sign (Chart Elements).
  • Add Axes and Axis Title.

You can modify the Chart Style clicking the Brush sign.

Add Vertical Line to Scatter Plot in Excel

This is the output.

Add Vertical Line to Scatter Plot in Excel

  • Go to the Insert tab and select Illustrations.

  • Select Shapes.

  • Choose the first Line in Lines.

  • The mouse cursor will change. Click a point to add the vertical line.
  • To keep the line straight, press Shift.

The line will be displayed in the chart.

Add Vertical Line to Scatter Plot in Excel

  • Click the line.
  • In Shape Format, select Shape Styles.

Add Vertical Line to Scatter Plot in Excel

  • In Theme Styles, select a theme.

The vertical line is displayed:

Add Vertical Line to Scatter Plot in Excel

Read More: How to Create Excel Scatter Plot Color by Group


Download Practice Workbook

Download the practice workbook.


Related Articles


<< Go Back To Edit Scatter Chart in ExcelScatter Chart in Excel | Excel ChartsLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Durjoy Paul
Durjoy Paul

Durjoy Kumar, with a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, is a dedicated contributor to the ExcelDemy project. His substantial contributions include crafting numerous articles and demonstrating expertise in Excel and VBA. Durjoy adeptly automates Excel challenges using VBA macros, offering valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, SPSS, C, C++, C#, JavaScript, Python Web Scraping, Data Entry... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo