LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Axis's autoscale but no plot shows?

I just don't undestand XY Graphs.
 
I have folowed the examples, tried the xy graph express vi,  even gone as far as copying and pasting the example vi right into my own program.
 
The axis's autoscale but the plot never shows on the graph?
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 6
(3,803 Views)
It would help if you could attach your code. An XY Graph has an array of x inputs and an array of y inputs. Are you trying to write a single point with each iteration? If so, you should look at the shipping example called XY Chart. It does exactly that. The other way is to have a couple of shift registers and add the single x and y points with the build array function.
0 Kudos
Message 2 of 6
(3,803 Views)

Ok here is my code, it's pretty ugly as I am just throwing everything at it trying to figure it out

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 6
(3,798 Views)
You only plot a single xy point, thus you should use a plot style for your plots that shows points. Currently you only graph lines, so single points won't show.
0 Kudos
Message 4 of 6
(3,792 Views)

oh... Now I am confused

How do I make an XY graph  that plots lines insted of just plotting one point?

I just went through all the plot styles and none of them seemd to plot the lines betwean the points.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 6
(3,787 Views)
You only generate one point for each iteration of the large FOR loop and, unlike charts, XY graphs don't keep a history. You might get what you want by double-clicking the "Built xy graph" express VI and unselect "clear data on each call". I don't really use that feature.
 
How fast does the loop run? Maybe it's OK to build the x and y array at the loop boundary and only plot at the end of the loop (green insert of image)? FOr continuous update while the loop is running, you could also build the x and y arrays in a shift register (upper part of image).
 
Notice that you don't need to do the complicated detour via a 2D array. Simply keep it as 1D array and insert an "array to cluster" for the chart (see image). Don't forget to set the cluster size to 3 by right-clicking on "array to cluster".
 
 
 

Message Edited by altenbach on 02-12-2007 03:56 PM

Message Edited by altenbach on 02-12-2007 03:59 PM

0 Kudos
Message 6 of 6
(3,783 Views)