I'm a labview beginner..I have a problem with an xy graph of a cluster of 2x 1D Arrays. x-axis is a time axis and it starts at 45 sec, then 75, 105,....The arrays have the size of 1008678. Problem:The graph links an incorrect order of the x-values to the given y-values. I tried to plot the graph with another time values but with the same delta-t (30sec) starting from 0 sec, just to show u here how i expect my graph to look like. I hope that u can help me! thanks!
Solved! Go to Solution.
the problem should be within your VI. You need to debug your VI!
Well, you could attach your VI here so we could look into it too - but you didn't so far…
Looking like the x and y arrays are exchanged (Guessing, try interchanging and see if it works)
-Post VI to check exactly not image.
-Start with below links to learn about LabVIEW programming and post VI/snippet which you tried and where you are stuck exactly.
Are you sure you want to show the lines and not just use it as a scatter plot? Click the little picture of a while zig-zag up near "plot 0" and you can turn off the lines, and increase the size of the points.
Alternately, you could sort the arrays so that the values all come in the order you want them in. There's a pre-made VI to sort a 1D array. If you want to use it to sort 2 linked 1D arrays, you have to bundle each point into a cluster and then sort the cluster of arrays. It'll sort based on whichever element in the cluster is at the top of the bundle function.
thank you for your reply and for the links. no, they are not exchanged.. thought that too at the beginning. sub vi is attached!
thank you for your reply. I want to show the lines not the points. I zoomed the curve and saw that the order of the points is not correct..and that is only when I take this 1D array as an x-axis. It works normally with other values of other input arrays to the sub vi (i use the vi for other input x and y axes). I will try the sorting, but I can see the correct order inside the array when I indicate it .. so how comes that the order is not correct?
does it makes sense to plot a million points (or even "lines connecting points"!) on a graph which is only ~200pixels wide?
Does it make sense to wire a numeric array to the "attributes" input of a BuildWaveform node?
Why do the index arrays not use the I32 datatype?
1. hi! no it actually doesn't. Question: is there any method to plot so many points? and why do I get such an xy graph (right) where the sequence of the points is incorrect?
2. Does it make sense to wire a numeric array to the "attributes" input of a BuildWaveform node? also no. I just made this to show how I expect my xy graph to look like.. but I normally don't use it.
thank you.. and please excuse my beginner mindset:)
why do I get such an xy graph (right) where the sequence of the points is incorrect?
In which way is the "sequence" incorrect?
See the attachment, reduced to examine just this graph…