LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help in contour maps in labview

Hi,
I am trying to program an aplication that gives a contour map of a data matrix. The matrix is calculated for each sample data(from force sensor) and changes with time as the sample data changes. I need the garph to change in real time on the screen. the graph should look like the output of the function "contourf" in MATLAB (I had attached an examole of it).
If anyone has an idea how to do this, or if you have vi that does it please help me.
Thanks
Message 1 of 15
(8,016 Views)
The closest standard LV indicator is the intensity plot graph. However, it uses the index values as x and y coordinates, and is unable to interpolate unpopulated array elements. So, forget it !
The best approximation to the Matlab contour function that I could find is the 3D graph, used unconventionnally : If you use only the projection on the XY plane, and ask for a contour plot, you get something rather similar to the "contourf".(see Ben, the seed is growing...;))
See the attached vi. You can right-click the graph to access the display options (in CWGraph3D>properties...)spec illy if you need to modify the contour number/distance.
The graph is disabled to avoid changes in the orientation by innapropriate user clicks.
I know, the display is not that nice : no way to change/hide the border; The x axis labels cannot be turned to get a conventionnal aspect, and so on...
But this is apparently the best that you can get from LV...

Hope this helps.

CC
Chilly Charly    (aka CC)
Message 2 of 15
(7,995 Views)
Nice CC!

I selected "interpolate" in the custom color map and customized the contour to make the lines black.

I added some animation for fun.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 15
(7,983 Views)

I selected "interpolate" in the custom color map and customized the contour to make the lines black.
I added some animation for fun


Funny that !
I deliberately deselected "interpolate" to be closer to the contour function. And I felt that the black contour lines were too "agressive"...
However, I agree that some animation improves greatly the picture 🙂
Ahh, relativity...

CC
Chilly Charly    (aka CC)
Message 4 of 15
(7,968 Views)
I am having a problem to check your VI because it is written in version 7.1 and I have 7.0.
Can you send it to me in 7.0 version / or lower ?
0 Kudos
Message 5 of 15
(7,932 Views)
Hi Ben ,
like I have wrutten CC I am having a problem to read your Vi because I have version 7.0 and not 7.1.
Is there any thing you can do to help me anyhow?
Thank you
Eran
0 Kudos
Message 6 of 15
(7,929 Views)
Here it is !

CC
Chilly Charly    (aka CC)
Message 7 of 15
(7,925 Views)
thank you .
I have another qustion
do you now how to add a color bar to the graph?
Eran
0 Kudos
Message 8 of 15
(7,905 Views)


@eran atlas wrote:
thank you .
I have another qustion
do you now how to add a color bar to the graph?
Eran



That's something more difficult. The main problem is to find a nice color bar display. In the attached vi, I have used "classic" controls.
You need to build 2 arrays, one for the values, the other for the colors, and pass the arrays, using the appropriate property node, to the 3D graph (dig, dig...).

Enjoy...

CC
Chilly Charly    (aka CC)
Message 9 of 15
(7,898 Views)
I don't think i had properly thank you , CC and Ben so,
Thank you very much for your help, I didn't belive anyone will do so
Have a nice day
Eran
Message 10 of 15
(7,866 Views)