07-24-2009 09:53 AM
Hi, I am trying to get two plots to show up on an xy graph. It would be continually changing points and i would like to have the old points stay on the screen and just kind of scroll over for both plots. Here is how I have it hooked up right now, and it just has a straight line down the whole time.
The two points x and y coming from the matlab script node would just be the two Y-axis values and the I tried to connect the iteration terminal of the while loop as the x axis. But this is not working correctly.
07-24-2009 10:27 AM
No code...
07-24-2009 10:31 AM
07-24-2009 10:36 AM
PLEASE DO NOT POST BITMAPS TO THE FORUMS. There's a reason why bitmaps are not allowed, and that's because they're HUGE. Don't just change the extension to get it past the upload.
OK, now that that's out of the way....
The XY graph has no buffer. That means you have to create one. You can either use the Express XY Graph and wire a False to the "Reset" input, or look at the "XY Chart" example that ships with LabVIEW that uses a subVI to implement the buffer.
07-24-2009 10:41 AM
Hi Bonesaw,
I think you need to build arrays of the data you want to display, not just the single points, then bundle the arrays and then build the bundled arrays in to a further array and connect to the graph. The .jpg shows how to display 4 plots, note the wires in to the separate bundles are arrays, not single data points.
07-24-2009 11:01 AM
07-24-2009 01:28 PM
You can change the colors of the plots through the XY graph properties.
Right click on the graph on the front panel, go to the 'Plots' tab.
Then you can change the color, name, and type of plot.
07-24-2009 01:41 PM
Yea, but because I am using a build array, it inputs the two Y-axis values as one input into the Y-value terminal. Therefore on the xy graph it only shows up as one plot
07-24-2009 01:49 PM
07-24-2009 01:52 PM