08-22-2008 09:47 AM
i have a table with 2 columns of data.
I would now like to plot these columns of data in an xy graph.
the 2 columns of data would be the y-axis data and the x-axis would be in mm increments,
any ideas?
- maryam.
08-22-2008 09:50 AM
Hi Maryam,
use the index array function to get your y-axis data and count the elements. You can use a for loop to create your x-axis out of this information. Connect the array size to the for loop and create your x array out of the i terminal.
Hope it helps.
Mike
08-22-2008 09:52 AM
Where is the x data coming from? Is it generated based on the number of rows and an increment? If so, you need to generate the x array using, for example, the built-in ramp function. Then you would need to make 2 plots and use Build Array to get them into an XY Graph. However, if the data is evenly spaced then you can simply wire the 2D data directly to a waveform graph instead of an XY graph.
Open the Example Finder(Help -> Find Examples) and search for "graph". Open the example called "XY Graph". It shows how to create different kinds of XY graphs. There are also several examples for other kinds of graphs.
08-22-2008 10:25 AM - edited 08-22-2008 10:26 AM
hi maryam,
r u looking for something like this?