01-22-2010 01:56 PM
Good afternoon, gentlemen.
I have some data in 2 columns of an array, and I wish to plot the first column as the x axis and the second column as the y axis. The way I have found to do this is separating the two columns and using the "Build XY Graph" express vi, as indicated below. However, I find this unpleasant and ugly. Is there a better way to do this? Ideally, I would like to keep the data together, without separating it, and I don't want to use a bulky "express" vi.
Thanks in advance.
Solved! Go to Solution.
01-22-2010 02:28 PM - edited 01-22-2010 02:31 PM
try this:
Simply slice out the two columns and bundle them. Make sure to wire the index to the lower terminal of the two to get columns instead of rows.
Also note that Index Array is resizeable, so you only need one instance.
(If you want two rows, you don't need to wire any indices to index array).
01-22-2010 02:36 PM
09-04-2011 06:37 PM
@altenbach,
what is that box between the "Insert into Array" and "XY Graph" boxes? also, does it slice row from row or column from column?
09-04-2011 07:36 PM
That's not Insert Into Array. It's an Index Array and as mentioned, the other function is a Bundle.
The Index Array can retrieve a row, column, or individual element.
11-27-2016 07:30 AM
I'm finding a problem with this! please can you help me out!
Thanks! 🙂
11-27-2016 12:33 PM - edited 11-27-2016 12:38 PM
@kashyapvelpuru wrote:I'm finding a problem with this! please can you help me out!
You are using a waveform graph instead of an xy graph.
(To get better help, please attach the actual VI instead of a blurry picture. There are several other things wrong in your VI. Building a scalar into an array of lenght zero seems silly. Do you really only want to graph the last point?)
11-27-2016 12:48 PM
I've got one two set of values temp and time, I need to plot temp in Y axis and time in X axis!
I'm a beginner and please help me with some short cuts and tips too! 🙂
Thanks @ altenbach!
11-27-2016 01:56 PM - edited 11-27-2016 02:49 PM
What determines your loop rate?
If the time points are equally spaced, all you need is a plain chart for the temperature. Set x0 to the current time at the start of the program.
If the time points are not equally spaced AND accurate time is required, you would build an array of accumulated data in a shift register. However, you should make sure that the size remains finite (e.g. the last 1000 points) so you will not run out of memory. You "initialize array" functions make no sense.
(As a cheap workaround, you could use the "built xy graph express VI" and have it retain data between calls. Not recommended).
What is the format of your received string? All you probably need is a simple scan function getting the values using decimal and time formats. Simplify!
Obviously you have virtually no LabVIEW experience, so I would recommend doing a few tutorials first. Why is your array indicator EXT leading to a coercion dot? Why is there no error handling?