12-28-2009 12:03 PM
Hey
I am graphing a set of x and y values with the connected points style line. On the graph the data is plotted but there is also a line that goes back to (0,0). Is there anyway to have CVI graph just my values and not connected back to the origin? Thanks!
Solved! Go to Solution.
12-28-2009 04:31 PM
CVI does not connect the last point of a series of measures with the origin. When this happens usually it means that you have stored your measures in larger arrays than you actually need and you are plotting more points than you have acquired, so that extra points with coordinates (0,0) are plotted.
As an example, supposing you have those arrays:
double X[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 0.0, 0.0, 0.0, 0.0 }
double Y[] = {1.0, 2.0, 3.0, 4.0, 5.0, 5.0, 5.0, 0.0, 0.0, 0.0, 0.0 }
If you plot only 7 measures you will have a regular plot, if you plot 8 to 11 measures you will see the additional line back to the origin.
I suggest you to place a breakpoint immediately before you PlotXY instruction and examine your data arrays with respect to the number of samples to plot.
12-29-2009 10:20 AM