• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Problems adding a vertical line

In the attached file, I am trying to plot column F (Strike Price) as a vertical line, so a vertical line at $20, but it's coming out horizontal. I changed it to XY Scatter and it is still horizontal, only much higher.

I also tried creating a separate table just for the vertical line with (X,Y) values of (20,10) and (20,30) and this didn't work. Then when I right click > Select Data Source, my new data series has the X coordinates from column D values, instead of X coordinates of 20 and 20 again. If I right click > Select Data Source again, then edit the horizontal axis for my new data series and select 20 and 20 from my new table, this changes the X axis not just for the new data series I am editing, but for all data series.

I'm fairly sure I didn't this many years ago, but I can't remember how I did this.

What is the best way to plot a vertical line?


There are many possible way to add even a vertical line.
All depends - how would You use it?
This is one sample.
Interesting solution. That is how I want to use the line, but I don't understand how you did this. When select that line, the data source doesn't light up so I can't tell which cells made that vertical line. With $22 is in the yellow cell, it looks like D9 is the X value with F9 and G9 as the Y values and D23 is another X value with F23 and G23 as Y values. But I can't make sense out of that.

Also how did you plot error bars?


Excel Ninja
How ...
with cell D9 You could select which row shows Error Bar.
#1 select cell F9 and study...
#2 select cell G9 and study...
#3 select cell D9 and study...
#4 select cell F11 and study...
#5 select cell G11 and study...
#6 select Error Bar > Format Pane
Screenshot 2022-09-23 at 09.39.06.png
This way could get many vertical lines.

You seems to asking about XY too...
Here one sample with that too.