07-24-2009 01:54 PM
Something is very weird in your program
You wire the "i" to the X connector of both bundle and then "X" result to the "Y" connector of the first plot and "Y" result to the "Y" connector of the second plot?!? Is this normal?
I mean, I would expect X and Y data from the formula node to form one XY data point.
Now you can use a normal graph since your X-axis is 0, 1, 2, 3, .....
XY graphs can be build up in two different ways:
a) 1 cluster containig 1 array for X data and 1 array for Y data. You can use this lay out when you get several, or all points, at one time or if you display the graph once you collected all the data.
b) 1 array of clusters, each cluster contains 1 X data point and 1 Y data point. You can use this lay out when you get one data point at a time and you want to display them immediately, not waiting to have them all.
I think the way you get XY data points fits the second way of working, so in the attached screenshot you can see that I make clusters of XY data and build them together using Build array and a shift register.
Or did I missed something
07-24-2009 01:57 PM - edited 07-24-2009 02:04 PM
Alain, you can plot the data as it is coming in, regardless of whether or not that is all of the data.
You can just build all the the x data into a 1D array, and the y data into another 1D array.
You can then cluster these arrays, where each cluster would be a plot.
You could just use the shift register to add the new points to each of the arrays.
This code would result in two plots being displayed.
The first plot would be the 1D array of X1 vs the 1D array of Y1.
The same holds for X2 vs Y2.
07-24-2009 02:03 PM
07-24-2009 02:04 PM
What you build there Cory is type a, in my description, of XY graphs setup.
Since his code generates one point at the time I would choose setup b.
But since the X-axis is 0, 1, 2, 3, and so on he doesn't need an XY graph in the first place!!!
He better use a chart, with buffer, to store his data.
07-24-2009 02:10 PM - edited 07-24-2009 02:11 PM
Ok then Y1, Y2 whatever
But then as I already said forget the XY graph and use a chart, that will buffer some datapoints for you.
See attached screenshots.
07-24-2009 02:44 PM
07-24-2009 02:53 PM
Look at the Charts.VI example in the example finder.
You want to bundle those 2 points together into a cluster, not build them into an array.
07-24-2009 03:04 PM
07-24-2009 03:09 PM
07-26-2009 09:57 AM
Sorry for the confusion, you need to bundle the 2 datapoints together instead of building an array, Ravens Fan already told yo that. Shame on me 😞
Regarding the X-axis, it's just a succession of data points 0, 1, 2, 3 and so on.
What do they represent? You should know better than us.
I mean every time you press the "Measure Spot Size" you go through that part of the code. So is that for every picture, then your x-axis is "Picture".
Is it for every ROI in one pictue, then your x-axis is "ROI/Picture".