LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph

Solved!
Go to solution

In this .vi I have an xy graph which plots a series of vectors. In order to be able to overlay each vector to allow me to view all previous plots I feeded our outgoing array back into the final "build array" function. I was hoping this would be read as the second plot and therefore could be displayed in a different colour. That way I could have the old data in one colour, and each new vector as another colour. It appears however that the xy graph does not read the cluster that way and instead refers to all data as "Plot 0". Any ideas on how to write this code to achieve my goal would be wonderful. I also have it set up to send an empty array in order to clear the data if needed. Attached is a screen shot of the code.

 

Thank you in advance,

Lanny22

 

 

0 Kudos
Message 1 of 6
(3,128 Views)

Hi Lanny,

     Now u are appending the data so u get only a single plot, To acheive ur goal please look at the screen shot which i attached.

 

BalajiSmiley Very Happy

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 2 of 6
(3,097 Views)

Hey Lanny22,

 

You will want to make each additional vector a new plot. Then, by default, LabVIEW will show each additional plot in a different color. A plot, as expected by the XY Graph.vi is a cluster of and array of your x values and your y values. Then, to show multiple plots, you would put those clusters into an array of clusters. Sort of a lot to wrap your head around so hopefully the attached screen shot helps clear things up.

 

Hope this helps.

 

-Ben

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 3 of 6
(3,063 Views)

Ben, 

 

Thanks for your advice on putting the x and y values into separate arrays. Worked a treat! But still hasn't solved my problem. I have my xy graph always displaying the most recent vector in yellow but I still haven't worked out how to program it so that every other vector is in another colour (i.e. red). I have tried using the "plot colour" property node but have had no success.

I have attached the latest screen shot of the .vi.

Please note I only have two xy graphs because I want it duplicated on the front panel.

 

Thanks again,

 

Lanny

 

0 Kudos
Message 4 of 6
(2,981 Views)

Then please post your VI.

 

The screen shot you posted doesn't show where you attempted to use the plot color property node.

0 Kudos
Message 5 of 6
(2,974 Views)
Solution
Accepted by topic author Lanny22

Lanny,

 

When trying to change the colors of multiple plots, make sure that you are referencing which plot you want to make the changes to.  You can do this by selecting the property, "Active Plot" and then setting whatever features you want in the propreties after that.  Here's a KB that outlines this.

ColeR
Field Engineer
0 Kudos
Message 6 of 6
(2,926 Views)