LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Colormap in X-Y graph

Solved!
Go to solution

I'm trying to define a custom colormap for a line ploted on a X-Y graph. Is this possible? I searched, but the only solution I could find was downloading the $4,000 Sound and Vibration Measurement Suite to get the 'Colormap' graph type. It doesn't seem like this should be that complicated in LabView.

 

I did what I want in Matlab, but I would like to loop my code in LabView to show captured data semi-realtime. I already have the code necessary for capturing the data, I just want to be able to color the graph. I would like to make the input a 2D array with two rows (X and Y), with an additional input array with the same number of columns as the data array indicating the color. The data array should be double-precision data type. Not sure what the color array would be, but I could imagine three rows with RGB integer values.

 

Figure from Matlab

Colored VI.jpg

 

Any help?

0 Kudos
Message 1 of 6
(4,118 Views)
Solution
Accepted by topic author Klasna

You can use an intensity graph, map your lines into it's grid, and use the Z for color.

 

 

 

Here is an example (posted here)

 

 

Message 2 of 6
(4,111 Views)

Are there any other options? The x-axis data is sourced from the voltage value of a function generator. Plotting this on an X-Y graph is trivial. Butchering the waveform to line up with indices of an array is doable I suppose, but far from ideal. I'll see if I can borrow the method in the code you posted.

0 Kudos
Message 3 of 6
(4,102 Views)

You can use any resolution you need and you can set x0 and dx for the axis of the intensity graph. Should be relatively trivial to re-map. If the points are scattered, the harder part would be to do the 3D interpolation. I think I've done it in the distant past.

0 Kudos
Message 4 of 6
(4,097 Views)

Here's very old example (posted here😞

 

Message 5 of 6
(4,091 Views)

Thanks for the tip altenbach, I was able to get it working with your suggestion.

0 Kudos
Message 6 of 6
(4,051 Views)