LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph XY - straight line 3 values

Hi All  -

I have an application where I have a value for my Y-axis, and I have a range in seconds on my x-axis.  All I want to do is draw a straight line, from 0 to 7 on my x-axis...at my value on Y-axis.  I've been looking at responses on the forum and it looks like I need an array of x/y values feeding into the plot.  Rather than populating tons of values....is there an easier way to just plot that one horizontal line at a value, and connect two points on my X axis?

(Note I have 3 of these that need to go on 1 plot)
LV7.1, LV8.5, LV2014/15/16
0 Kudos
Message 1 of 3
(3,230 Views)
Hi,

On a XY Plot, LabVIEW connects all consecutive points with a straight line.  If you only have two values in your arrays, then the two points will automatically be connected with a straight line.  I'm attaching some sample code that shows you how to generate the straight lines as well as display them on the same graph.  Note that the method for including many graphs on one plot can be scaled to include more or fewer plots as necessary.

Kind Regards,

Justin Fuller
National Instruments
0 Kudos
Message 2 of 3
(3,219 Views)
10-4 Got it to work

Thanks a bunch
LV7.1, LV8.5, LV2014/15/16
0 Kudos
Message 3 of 3
(3,211 Views)