Home » excel » How can I add a vertical line to a line graph in excel?

How can I add a vertical line to a line graph in excel?

Posted by: admin May 14, 2020 Leave a comment

Questions:

Example of what I have been able to do from other examples. Note: still not correct.I have a list of years from 2019-2098 that I want to be the x-axis values. The y-axis will be from 0 to 1 for probabilities. The line graph will measure the survival probability curve in relation to years. The issue is that I need a vertical line to reside on the mark for year 2042. Is there a way to do this? Everything I have found online doesn’t work! The photo is what I get from doing an online example. It produces a vertical line but not in the correct spot.

How to&Answers:

You could add a separate data series that consists of (2042,0) and (2042,1).

Graph them as a scatterplot on top of your existing data. If needed, go to Change Chart Type and set the appearance to connect the two points with a line where the points don’t show. Example: Scatter plot without points showing.