How to Add Vertical Line to Scatter Plot in Excel (2 Easy Methods)

In Microsoft Excel, it is quite easy to draw a horizontal line on any chart. But when it comes to adding a vertical line, it becomes really tough to add a vertical line on a chart. This article will mainly focus on how to add a vertical line to a scatter plot in Excel. I hope you find this article very informative and gain lots of knowledge regarding this.

To add a vertical line to the scatter plot in Excel, we have found two different methods including the error bar and Excel shapes. Both of the methods are fairly easy to use. These methods give us a proper system on how to add a vertical line to the scatter plot. To show all the processes, we take a dataset that includes student’s roll number and their marks in the exam. Basically, we plot a scatter chart using this dataset and after that add a vertical line to that scatter chart.


1. Using Error Bars to Add Vertical Line to Scatter Plot in Excel

Our first method is basically to utilize the error bar. In this process, we utilize an error bar percentage where we set the horizontal bar percentage to 0 and set the vertical bar percentage 100. By doing this, we eliminate the horizontal bar and utilize the vertical bar. To apply this process, follow the steps properly.

Steps

  • At first, select the range of cells B5 to C11.

  • Then, go to the Insert tab in the ribbon.
  • From the Charts group, select the Scatter Chart option.

  • After that, select the first Scatter chart from the options.

  • It will provide us with the following chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Then, you can modify the chart by utilizing the Chart Elements option.
  • To modify the chart, click on the plus sign which is basically the Chart Elements option.
  • We added Axes and Axis Title on the chart. See the screenshot.

  • Then, you can modify the Chart Style by clicking on the Brush sign on the right side of the chart.
  • Take your preferred chart option from there.

Add Vertical Line to Scatter Plot in Excel

  • As a result, we get the following chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Then, right-click on the chart.
  • A Context Menu will appear.
  • After that, click on Select Data.

Add Vertical Line to Scatter Plot in Excel

  • Then, the Select Source Data dialog box will appear.
  • From the Legend Entries (Series) section, click on Add.

  • After that, the Edit Series dialog box will appear.
  • Set the Series name, Series X values, and Series Y values.
  • Finally, click on OK.

Add Vertical Line to Scatter Plot in Excel

  • Then, it will take us to the Select Data Source dialog box again.
  • Click on OK to finally apply this series in your scatter chart.

  • Then, if you look at the chat closely, it will find the student whose roll number is 4, has a different color in his point compared to others’ points on the scatter chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Then, click on the new point which is different from the others.
  • It will open up the Chart Design tab in the ribbon.

Add Vertical Line to Scatter Plot in Excel

  • Then, click on the Chart Design tab in the ribbon.
  • From the Chart Layouts group, select Add Chart Element drop-down option.

  • After that, from the Add Chart Element drop-down option, select Error Bars.
  • From the Error Bars option, select Percentage.

Add Vertical Line to Scatter Plot in Excel

  • It will create horizontal and vertical percentage lines on the point.
  • As we just focus on the vertical line, we need to remove the horizontal percentage line.
  • Right-click on the horizontal line and a Context Menu will appear.
  • From there, select the Format Error Bars option.

Add Vertical Line to Scatter Plot in Excel

  • As we don’t need any horizontal line, in the Error Amount section, set the Percentage as 0.

  • It will remove the horizontal line on the point.
  • Finally, we get the following chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Now, we want to modify the vertical line in the scatter chart.
  • Then, right-click on the vertical line on the point.
  • A Context Menu will appear.
  • From there, select the Format Error Bars option.

  • It will open up the Format Error Bars dialog box.
  • Then, from the Vertical Error Bar section, set the direction as Both. This means the error bar will show in both directions.
  • After that, in the Error Amount section, set the Percentage to 100.

Add Vertical Line to Scatter Plot in Excel

  • Finally, we get our desired vertical line to scatter plot.

  • Then, if you want to change the color and width of this vertical line, you need to go to the Format Error Bars dialog box again.
  • First, go to the Fill & Line option at the top.
  • Then, in the Line section, change the Color and Width to your preference.

  • There we have our final solution regarding vertical line to scatter plot. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

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


2. Adding Vertical Line to Scatter Plot Using Excel Shapes

Our second method is to use Excel shapes to add a vertical line to a scatter plot in Excel. First, this method creates a scatter chart using our dataset. After that, we utilize the Excel shapes to add a vertical line to that scatter plot. This is basic produce to add vertical line but effective in some cases. To apply this method, follow the steps carefully.

Steps

  • At first, select the range of cells B5 to C11.

  • Then, go to the Insert tab in the ribbon.
  • From the Charts group, select the Scatter Chart option.

  • After that, select the first Scatter chart from the options.

  • It will provide us with the following chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Then, you can modify the chart by utilizing the Chart Elements option.
  • To modify the chart, click on the plus sign which is basically the Chart Elements option.
  • We added Axes and Axis Title on the chart. See the screenshot.

  • Then, you can modify the Chart Style by clicking on the Brush sign on the right side of the chart.
  • Take your preferred chart option from there.

Add Vertical Line to Scatter Plot in Excel

  • As a result, we get the following chart. See the screenshot.

Add Vertical Line to Scatter Plot in Excel

  • Then, go to the Insert tab in the ribbon.
  • Select Illustrations drop-down option.

  • Then, select the Shapes drop-down options from the Illustrations option.

  • Then, select the first Line option from the Lines shapes.

  • You will see the mouse cursor will be changed.
  • Then, click on the point where you want to add the vertical line.
  • To keep the line straight, press the Shift button.
  • As a result, the line will appear in the chart.

Add Vertical Line to Scatter Plot in Excel

  • Then, if you click on the line, the Shape Format tab will appear in the ribbon.
  • In the Shape Format, select the drop-down option in the Shape Styles group.

Add Vertical Line to Scatter Plot in Excel

  • It will open up the Theme Styles.
  • Then, select any preferred theme from there.

  • Finally, we get our desired vertical line to a scatter plot in Excel.

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 below.


Conclusion

To add a vertical line to a scatter plot in Excel, we have shown two different methods. Both of these methods are equally good and effective. But in my opinion, adding a vertical line with the error bar process is much more efficient. I hope you find this article very informative and it covers all the necessary solutions regarding the vertical line to scatter plot. If you have any questions, feel free to ask in the comment box. Don’t forget to visit our Exceldemy page.


Related Articles


<< Go Back To Edit Scatter Chart in Excel | Scatter Chart in Excel | Excel Charts | Learn 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