10-31-2016 08:08 AM
Trying to insert 1 vertical line on xy-graph, but get several. Can anybody give me a hint on what I have done wrong?
Solved! Go to Solution.
10-31-2016 08:14 AM
A line in a XY graph is at least defined by two points. If you want more seperate lines of the same color / within the same plot, seperate them with a NAN point...
10-31-2016 08:18 AM
I only want ONE vertical line 🙂
10-31-2016 08:28 AM
When I run your snippet (please put in typcial data and save as the default data, I had to make up some data), I do not get the graph you show in your second picture.
Actually nothing changes between graph 2 and graph 1. You are adding just a single point to the graph at (30, Value of Yscale max). And you don't see that because the point style is none. If you create an array with two elements of 30 in your X array, and a 0 and Yscale Max, or perhaps Yscale Min and Yscale max in your Y array, then you will see a vertical line.
10-31-2016 08:41 AM
Addition to my post: a point in this case is a pair of a x and a y value 🙂
If you enter -Inf and +Inf for the y values you should always see a line ( well, ignore log scale 😉 )
10-31-2016 08:55 AM
You are right. Thank you all off you 🙂
10-31-2016 08:59 AM
Well, looking at your code I see you try to plot 1 point and configure it as bar plot and fill to -Inf. This should give a vertical linie.
But your style goes to Graph2 and you add the point to Graph1.
So you have to use another property node for Graph1 to set your style. Use 'Active Plot' property before Plot.BarStyle and Plot.FillTo.
Hope this helps.
UliB