LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

constraining the algorithm for assignment of multiple plot colors

I would like to know if there is some way to modify the algorithm that LabVIEW uses to automatically assign different colors when a graph displays multiple plots. In particular, given the default background color (black), it appears that black is never used for a plot color. However, if I programmatically change the background color to white, for example, I would like the plot color assignment to not use white. I would also like to know if it is possible to constrain the plot color assignment to a single color a priori, without having to go back and explicitly assign the colors of each plot via the property node in a loop.

Thanks.

Lyle
0 Kudos
Message 1 of 2
(2,527 Views)

I think you will have to create your own plot color assignment function to do this.

You can set the color of each plot by using the active plot property (index of the plot you want to change) and then set the plot color property (just expand one and the same property ndoe to set both at the same time).

You can then make that function check the background color and choose a color table that fits. If this is in a built application you would run this function when a color change is detected, if it's in the development environment you need this feature make the function ask for a VI and plot name (so that it can get a reference to the plot) and put it in your projects folder. That way whenever you need to set the plot colors differently you just select this function from the Tools menu of LabVIEW. An easier alternative though would be to just create the different graphs you need (with the colors for all plots already defined correctly for that background etc.) and save them as custom indicators...

0 Kudos
Message 2 of 2
(2,514 Views)