LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph multiplot properties

Solved!
Go to solution

Hi, inside a loop I acquire two curves (y1 and y2), with the same x axis. I want to plot them together, in the same xy graph, realtime. So I bundle them separately (x,y1 and x,y2), then the outputs go to the xy chart buffer functions, and finally I build an array which is connected to the xy graph. All is working, but the two curves have the same properties. Data are stored in different columns, as I can see from the Spreadsheet file, but in the graph they appear with the same plot.

Any idea. It is difficult for me to attach the VI here as Labview 6 is in another OLD computer without internet access

Thanks

Antony

0 Kudos
Message 1 of 10
(5,670 Views)

Antony,

 

If you are just trying to plot 2 xy graphs on the same graph, it sounds like you are doing the correct thing.  See attached png and make sure you are doing something like that.

 

-cb

0 Kudos
Message 2 of 10
(5,656 Views)

It is almost the same as my VI, the only difference is that all this is inside a loop, so the only added bits are two XY chart buffers between the bundle and the build array. I need the graph to stay inside the loop because I want to see the evolution of the data while they are acquired. Furthermore, in your way the two plots are actually the same, as you cannot distinguish them while plotting. That's my main problem. To be able to distinguish the two xy plots (different symbols, colours...) drawn in the same xy graph

Thanks

0 Kudos
Message 3 of 10
(5,642 Views)
Right Click on the XY Graph and select Plot Legend. from there you can change the properties of individual plot(color, style, width etc.).
0 Kudos
Message 4 of 10
(5,632 Views)
already tried changing the properties, it does not work
0 Kudos
Message 5 of 10
(5,622 Views)

Antony,

 

Hmmm.  The suggestions that we have given you should work.  If you wire up the code example I posted in the png, you will get a graph with two distinct plots on it.  Have you tried that? 

 

You should also be able to show the plot legend and be able to interract with both plots.  Note: by default, the plot legend will only show one plot.  You must resize it to show more than one.  Maybe you are getting hung up on that.

 

What version of LV are you coding in?  Is there some way you can upload a picture of the code you are trying to implement?  Simplify it so that we are only dealing with the plot issue.

 

-cb

0 Kudos
Message 6 of 10
(5,616 Views)

I was able to attach the pictures of the VI.

The content of the sequence is purely indicative, but they represent the problem I am facing.

Thanks for your help

Antony

Download All
0 Kudos
Message 7 of 10
(5,609 Views)

Antony,

 

I think I see your problem.  It looks like you are concatenating the array inputs to the build array vi.  Right-click the build array vi and uncheck the "Concatenate Inputs" menu item.  You should then get your two plots.

 

-cb

0 Kudos
Message 8 of 10
(5,587 Views)

I tried unchecking the Concatenate inputs, but now there is the error to have connected two arrays of different dimensions (the dimension of the out of build array is 2, dimension of XY graph is 1). However, the dimension of the two clusters seem the same to me.

I tried following the help with Reshape array, the error goes, but there is no correct output, or no output at all.

Thanks

A.

0 Kudos
Message 9 of 10
(5,553 Views)
Solution
Accepted by antony_sc

Found the solution: you need to put a BUILD ARRAY CLUSTER after the two xyBuffers, before the XYgraph.

This works

0 Kudos
Message 10 of 10
(5,385 Views)