LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plot colors

Hello everyone,

 

I need some help on something that Im trying to figure out.

I need to plot on a waveform graph different points but I need to change the color by groups of 16.

Lets say that I have  304 points and I need to plot it every 16 points with a different color.

If anyone have a clue or an example just let me know ...

Thanks a lot !!

0 Kudos
Message 1 of 5
(3,122 Views)
There are several ways but they are all done with multiple plots with different colors to look like 1 plot.  Break the data array into 16 groups of points (you might repete the transition points to get a continious looking plot).  One useful trick is that NAN is not plotted to get gaps in the plot.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(3,107 Views)
very crude example is attached.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 5
(3,103 Views)

I cannot break it in groups of 16 ... the number of points are variable and it is not viable for example to break 304 points into 19 subplots or what about if I have 1000's of points ??

 

I need to make this automatically ... for a variable number of points and on the same graph.

 

Thanks for your help ...

0 Kudos
Message 4 of 5
(3,089 Views)

You can make this example to work with any group of numbers, simply modify the code to make the last group of numbers to have a subset fo the data which is allowed since the result is an array of clusters and not a 2d array.  If you want different size groups change the 16 to what ever you want.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 5
(3,076 Views)