LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph

Hi,
I am trying to use an XY graph to graph sets of data. The data are output inside of a while loop, 32 points at a time (x, y) where x is from 0 to 32 and y is from the points on the scope. I want to graph it so that there will be different lines. I tried to use the shift register and build array way, but my graphs are connected from the end of one line to the start of another line, (31,y) to (0,y). Do you know how to fix this? Thanks. Also how do you programmatically tell the program to label each line, make it different color and display corresponding legend after each line is graphed?
Thanks
Message 1 of 7
(3,931 Views)
Under LabVIEW "Help", click "Find Examples", then search for "XY Graph." It shows examples of different types of plots.

Les
0 Kudos
Message 2 of 7
(3,931 Views)
It sounds like you are building two long arrays and then bundling them together into the cluster that the XY Graph requires. Instead, you want to bundle each plot (two arrays of 0-32 points of x and 0-32 points of Y) together into a cluster and then build an array of those clusters. Feed this array into the XY Graph. Each will be its own plot with its own color and name.
Message 3 of 7
(3,933 Views)
Thank you, the XY Graph with Multiple Plots example, and your description about building an array of clusters containing the XY data solved a problem that was really giving me headaches.  I am plotting multiple device characteristic curves, and they were joined by an annoying line from the last data point of the prior plot to the first data point of the new plot (using the express XY graph with the reset off).  Now, with the proper data handling, and the standard XY graph, it is working just as I hoped.
0 Kudos
Message 4 of 7
(3,702 Views)

Bob Young, I like the example you made here. I like the way the graphs are plotted in different colors. My application is to discharge a fuel cell stack for many cycles. The plots may be very close to each other, that's why I want them to have different colors. Also I want the plot to be displayed point by point, it's a long process, it will be inconvenient to wait until the whole cycle is done then plot it. If possible, can you give some advice about how I can make it.

Best regards,

Guangde Wang

0 Kudos
Message 5 of 7
(3,508 Views)
Attached is an example of how to do what you want. In the example, the x/y values come from random number generators and a new trace is initiated by pressing a button. But it should get you pointed in the right direction.

Mike...

PS: the thread that you added on to was started 3 years ago. In the future starting a new thread will increase your chances of getting an answer.

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 6 of 7
(3,493 Views)
Mike, thank you for the reply and example. The example works just as I wanted. I'm still have a hard time to understand how it works and trying to understand it and integrate it into my program. Thank you again for your help.
 
Guangde Wang
0 Kudos
Message 7 of 7
(3,473 Views)