05-12-2017 06:26 AM
Hi,
I am in "for loop", have array of elements(ex: 10) and doing some calculations.
Now i want to generate graph using this array. I can do it for all elements.
But i want to draw graph of only from Row 2 to 8 elements.
How can i?
Solved! Go to Solution.
05-12-2017 06:46 AM
Hello,
insert "Array Subset" function into the array wire before the graph und set "index" and "length" input as needed.
Hope this helps.
UliB
05-15-2017 06:52 AM
Hi UliB,
This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.
Now, little addition to this.
what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?
How to bundle these 2 arrays and draw graph?
The arrays and for loops confuse me a lot.
05-15-2017 07:40 AM
@sacsk123 wrote:
Hi UliB,
This works like a charm.I didnt expect even after bundling arrays, we can select the start and end of array. Thank you for that.
Now, little addition to this.
what if i have x-axis elements inside the "for loop" and y-axis elements are outside the for loop?
How to bundle these 2 arrays and draw graph?
The arrays and for loops confuse me a lot.
You'll need as many X-elements as Y-elements - as i interpret your text it sounds like you'll end up with skewed arrays.
/Y
05-15-2017 03:29 PM
Hello,
your data type is 1D array of cluster of 2 elements, so you have to bundle your elements together and create an array (autoindexing).
I see you are using picture indicator to show the graph. I would use a XY Graph (not 2D picture), which can use a cluster of two 1D array as data type. In this case you would bundle X array and Y array after for loop together and wire it directly to XY Graph indicator.
Hope this helps
UliB
05-16-2017 01:16 AM
Hi UliB,
In for loop,I was clubbing elements of 2 arrays using the "bundle by name" and come out of loop and use XY graph.This works fine.
But for this case(1 array inside the loop and other array outside the loop) - i just got both arrays outside the loop and used "Build XY graph". It worked for me.
Thanks for the help.