LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot multiple points in real-time on a XY graph in different colours?

Solved!
Go to solution

Hi,

 

I am a labview beginner.  Here is a screen shot of the program. It provides real time feedback for a patient when walking of their foot position, random target (point changes with each step) and a reference point (constant).  Right now, the three data points are grouped together in the same plot on the XY graph.  In the graph properities, when I change the colour for Plot 0, the colour of all the points change.  I have tried connecting the XY graph to the array built above, but a broken wire error occurs (connected 2 clusters with different contents).

 

Any help would be great!  Thanks

0 Kudos
Message 1 of 7
(5,050 Views)

Each color needs to be it's own plot.

 

Alternatively, you could map your data into an intensity graph, where x and y determine the coordinates and Z maps into a color scale, for example similar to this.

 

A picture is pretty useless for troubleshooting, so please, if you can, attach a simplified version of the actual VI. (It is impossible to logically navigate your diagram picture, because lots of code is hidden outside the image boundaries or inside other cases. Also, all dataflow is broken and it suffers from serious sequencitis, localitis, and globalitis ;))

0 Kudos
Message 2 of 7
(5,042 Views)

Thanks.  I was trying to change the plots in the properties, but it didn't work.

 

Here is the original version of the program (exactly the same but without the random number) without sub vi's.  It was previously built by someone else and I'm trying to make a few changes.

Message 3 of 7
(5,033 Views)

OK, looking at what you labeled "XZ graph"

 

XY graphs can take many kinds of data.

 

Arrays of XY point clusters, cluster of xy and Y arrays, complex arrays, etc. 

 

You are creating three points (cluster of two scalars, x and y). Building them into an array will create a simgle plot with one color.

 

Here's what you could do, buth there are many other ways.

 

0 Kudos
Message 4 of 7
(5,031 Views)
Solution
Accepted by topic author Awalk

@Awalk wrote:

Thanks.  I was trying to change the plots in the properties, but it didn't work.


Here's what you can do with very minor changes. It is basically the same as in my earlier example.

 

 

Message 5 of 7
(5,027 Views)

Or course since you are already using the "plot images" overlay feature, you could just draw your data as circles using the same. 😉

0 Kudos
Message 6 of 7
(5,023 Views)

Thank so much, its works!  I tip my hat to you 🙂

0 Kudos
Message 7 of 7
(5,016 Views)