11-27-2009 07:30 PM
Hi guys,
For example, I have the vectors:
x1 = [2 4 6 8 10], y1 = [4 7 8 9 4 ]
x2 = [ 1 2 3 4 5 6 7 8 9], y2 = [ 2 4 5 6 7 5 8 8 7]
I want to plot (x1,y1), plot(x2,y2) on the same graph. Notice that the length of the two plots are different.
I tried to use the XY graph, but there is no way to do this, and the waveform graph, requires an inital value for x, and delta x, which are not the same in this case.
Thank you for any help.
Solved! Go to Solution.
11-27-2009 09:19 PM
If you hover over the BD terminal of the XY graph it shows you how to get multiple plots, just build an array of individual XY plots.
11-27-2009 09:38 PM
Thanks Darin. You provided the solution.
What confused me about the XY graph, was that when I placed in on the block diagram, the express build XY graph was attached with it, and when I hover on the XY graph, on the context help it was only showing the use of the express build XY graph.
11-27-2009 10:02 PM
With a name like "Express XY Graph" it has to be good. Allow me to list a few things I use more often than Express VIs: local variables, global variables, stacked sequence structures. Now that I think about it, I use Express VIs about as often as I use the Stop Function.
If you really wanted to see the glory of the "Express" version, you can create your Express XY Graph. Copy the Helper VI, use build array to get an array of the output graphs and feed that to the graph. As an added bonus you get lovely conversions of the data from array to dynamic data. I feel guilty showing this, just remember, friends don't let friends do this: