LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visualize array values on graph

I have build a 2D array (DBL) by extracting values from a text file, and I would like to visualize these points in a graph but I do not manage to do that. My array is as following :
 
X axis => -150 -120 -60 -30    0   30    60   90  120  150   -150  -120 ...
Y axis => -20    -20  -20 -20 -20  -20  -20  -20  -20   -20     20      20  ...
 
Thanks in advance
 
0 Kudos
Message 1 of 26
(4,198 Views)

Use xy graph

as shown in  attached pic

0 Kudos
Message 2 of 26
(4,188 Views)
Thanks for the response but I do not manage to extract my values from my 2D array to visualize them in the graph even with XY graph.
My vi is a XML file parser that extract values (Azimuth and Elevation) and I would like to visualize them in a graph first, then affect a color table and visualize the offset corresponding to these value.
Attached is the vi and the XML file (zipped) to be read.
 
If you can show me how to extract and visualize the data from the 2D array of DBL.
 
Thanks in advance, 
Download All
0 Kudos
Message 3 of 26
(4,157 Views)

Hi

Just extract one row to be the x-axis, a second row to be the y-axis, bundle it as in the online help of the XY-graph explained, wire it to the graph and that's it.

Thomas

Message Edited by becktho on 12-04-2006 02:56 PM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 26
(4,153 Views)
Just a question,
As the jpeg attached "2D Array El Az values Only1output.JPG" I have only 1 output (2D) with the "Array Sub assembly"  option, so please cold you let me know the configuration you have on your example to have 2 outputs 1D by using the "Array Sub assembly" option ?
 
And if I extract in 2 arrays (as 2D Array El Az values.JPG attached), these 2 arrays are still in 2D, so I can not connect it to the Assemble option that need.
 
Thank in advance
 
 
Download All
0 Kudos
Message 5 of 26
(4,142 Views)

Hi

You can resize the "Index Array" function, if you move the courser over the top or bottom edge.

In a 2D-Array you can then extract a single row, a single column or a single cell as you can see in the picture.

You did get a 2D-Array because you used the "Array Subset" function and this will always return an array with the same dimension number as the original one.

Hope this helps

Thomas

Message Edited by becktho on 12-05-2006 07:31 AM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 26
(4,123 Views)

Ok good, I used the array subet instead of the index array.

Now I can display the XY graph with azimuth and elevation values, is it possible through Labview to display for example this graph by affecting a color table for the elevation offset or azimuth offset. That is to say, we have a elevation offset for each calibration point, and we would like to display this offset closed to each point inside the graph, or affect a color to the point depending to the value of the offset just to visualize easily all the offset for each point.

Thanks in advance

0 Kudos
Message 7 of 26
(4,099 Views)

I don't know if this is what you are looking for exactly, but maybe it helps you to get further.

Now you bundle the x and y-values to one single graph, which is displayed in the XY-graph. You could no make several graphs, as each graph can have a different color.

So for instance, you have one graph with elevation 0.05, another graph with elevation 0.1 and so on. For this you have to extract the correct value pairs from the arrays you use now to build the single graph.

Hope this helps a little bit.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 8 of 26
(4,096 Views)
In fact it is not exactly what I am looking for.
 
I do not want to make several graph but only one graph with the same points that I have already done but for each point affect a color table to represent and display a different color for each point.
 
For example,
for the Azimuth 0 and Elevation 0, if the elevation offset is 100 the representation is blue
for the Azimuth 30 and Elevation 0, if the elevation offset is 150 the representation is more blue than the previous point
for the Azimuth 60 and Elevation 0, if the elevation offset is 300 the representation is more more blue than the previous one
 
Color table depends on the offset value.
 
Is it possible ?
 
Thanks,
 
0 Kudos
Message 9 of 26
(4,086 Views)

Hm - maybe you misunderstood. With multiple graphs I meant different plots in one XY-graph.

As you can see in the attached picture, there are three plots in one graph.

Basically you have to say the vi, which color should be applied for which plot. If you want to use a colortable, you have to write the properties of the graph, but you have to know the corresponding plot. So if you want to change one plot's color, you have to specifiy its index in the graph and then set the color.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 10 of 26
(4,062 Views)