LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vertical line on XY-plot

Solved!
Go to solution

 

Trying to insert 1 vertical line on xy-graph, but get several. Can anybody give me a hint on what I have done wrong?

 

Capture.PNG

snip.png

0 Kudos
Message 1 of 7
(4,029 Views)

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

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 7
(4,027 Views)

I only want ONE vertical line 🙂

0 Kudos
Message 3 of 7
(4,022 Views)

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.

0 Kudos
Message 4 of 7
(4,013 Views)
Solution
Accepted by Michael.Koppelgaard

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  😉 )

vertical line.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 7
(4,002 Views)

You are right. Thank you all off you 🙂

 

0 Kudos
Message 6 of 7
(3,993 Views)

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

0 Kudos
Message 7 of 7
(3,991 Views)