LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

color scale into matlab

I'm new to LabView and I have a simple question: someone sent me a vi with a colorbar, with blue at 90% and red at 100%. I have some plots in matlab that I want using the same color scale. While I can use a similar blue to red graduated color bar in matlab, the exact shades seem to be a bit different. Is there a way I can extract the lookup table that relates intensity to color and import this into matlab?
0 Kudos
Message 1 of 3
(4,295 Views)

Hi Kid Lu,

 

Here is a great document for how to get access to the color markers used on an intensity graph: http://digital.ni.com/public.nsf/allkb/1ADFF221E27F5B5886256E6F007C7B58?OpenDocument

You can either right click the # on the right side of the intensity graph and go to marker color to see the exact RGB values, or use a Zscale.MarkerVal[] property node to read from the intensity graph its current color settings pragmatically.

 

 

Stephen B
0 Kudos
Message 2 of 3
(4,259 Views)

Much appreciated! I figured it out eventually, but I had to do some reading as I didn't know the first thing about anything. Anyways, I finally figured out that the shading of the z scale was determined by a color table, which was actually a 1d array of colors. I probably didn't do it the smartest way, but I ended up using division and modulo arithmetic to get at the individual RGB values of each color and put that data in a 2d array which I then wrote into a CSV file.

0 Kudos
Message 3 of 3
(4,245 Views)