LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph questions (LV 6.i)

OK a couple things...

First, is there a way to plot single points on the XY graph instead of connecting them with a line?

Second, and this might be corrected by the first question, but when I start adding data to an XY graph a line connects the most recent point to the origin. What can I do to get rid of this?

Thanks
0 Kudos
Message 1 of 8
(3,440 Views)
Right click on the graphs plot and mess with "interpolation" and "point style"
see attached graph
0 Kudos
Message 2 of 8
(3,440 Views)
Right click on the plot legend and choose interpolation. The first option removes all line connections.
0 Kudos
Message 3 of 8
(3,440 Views)
To get rid of the lines just do what other answers say, but that way, you'll have a point in the origin (think it's 0,0) to avoid having this, be sure the array you wire is empty before adding your data, if not, and your array contains a 0,0 value on it, you should get rid of it.
Hope this helps
0 Kudos
Message 4 of 8
(3,440 Views)
Thanks. I thought you had to initialize the array locations with a value i.e. 0. You can just leave this empty?
0 Kudos
Message 5 of 8
(3,440 Views)
Yes, if you don't want to plot anything, that's the way you clear a XY graph too.
0 Kudos
Message 6 of 8
(3,440 Views)
Not a simple question to answer. You can create an empty array and start
writing data to it, and Labview will simply extend as necessary. Here you
don't need pre-initialisation. In some cases, for performance reasons, it is
necessary to pre initialise the array and replace elements as needed.
Chances are you're not in this situation, but if you were, then
pre-initialising with the numeric constant "NaN" will not result in spurious
zeroes on the plot, since "NaN" represents invalid data.

Adam_J wrote in message
news:506500000005000000A72B0000-986697009000@quiq.com...
> Thanks. I thought you had to initialize the array locations with a
> value i.e. 0. You can just leave this empty?
0 Kudos
Message 7 of 8
(3,440 Views)
Just try this
function PlotPoint( bxdata as single, bydata as single)

cwgraph1.Plots.cwgraph1.Plots.count).PlotXvsY bxdata, bydata
end function


just use this routine this will solve your problem. It will plot
0 Kudos
Message 8 of 8
(3,440 Views)