I'm trying to build xy graphs with multiple plots in a loop. In the attach, if I cluster each element and build an array , the plot looks fine (XY Graph). If I try to do it in a loop, I get extra points added (XY Graph 2). All the xy sets dont have the same number of elements, and the loop version pads with 0s to make the inner arrays square. This doesn't happen when I do it manually. How can I make this work in a loop?
The convenience of handling the data in a 2D array is offset by the padding problems in your case.
If you need to manipulate the data this way, one solution would be to calculate the individual array sizes outside of the loop, pass these in as a third array, and use "Array Subset" inside the loop to strip off the padding elements (see attached).
Thanks. It didn't occur to me that the padding was happening outside the loop. Im trying to make a generic vi that will plot an arbitrary number of xy data sets. I guess this is what has to be done if all the sets dont have the same number of data points
I am not exactly sure what you are saying... However, I took a look at your VI and I assume you need a while loop around the case structure so you have enough time to click the 'OK' button.