LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph with predetermined color

Solved!
Go to solution

Hi

I have an array of waveforms. Now i want to display them on a waveform graph in a manner that only two or three colors be specified for waveforms. for example if my array consist of 150 waveforms, first 50 waveforms must be displayed with red color and the rest be displayed with black color. of course i don't want to do this manually. is it possible by labview?

Regards 

0 Kudos
Message 1 of 4
(2,794 Views)
Solution
Accepted by topic author farashi

You will need to use the properties "Active Plot" and "Plot Color" to manage this programmatically.

So you first need to get the number of plots - another property - then decide how you want to devide them in different colors, and set every active plot to the specified color.

 

 

Hope this helps,

Christian

0 Kudos
Message 2 of 4
(2,789 Views)

little example attached (compiled for 8.2.1)

 

 

0 Kudos
Message 3 of 4
(2,763 Views)
In normal use, you will need to plot the data on the graph before you set the colors.  This is because LabVIEW does not allocate space for plot colors/line width/etc. unless the plot actually exists.  However, you can preallocate plot parameters by setting the Legend»Plots Shown property.  Given you large number of plots, you may want to look into the Defer Panel Updates property of the Front Panel.  See the LabVIEW help for details.  If you run into problems, let us know.
0 Kudos
Message 4 of 4
(2,744 Views)