From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Surface Plot

Hello to all,
 
I am having difficulty generating a 3D plot for data collected. I have a 1D array for X, for Y ,and for Z. I load each array into a invoke node of the 3D surface plot. Still, i see no data...I am using a color spectrum
 
What is my problem?
 
 
Thanks in Advance
0 Kudos
Message 1 of 9
(7,159 Views)
Hi Fred,

I couldn't figure out what goes worng with your VI, but I saw a couple of thread about 3D plots and 3D surfaces.
I suggest you do have a look at the thread below, I'm sure you'll good ideas :

http://forums.ni.com/ni/board/message?board.id=170&message.id=155290&query.id=3850#M155290

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 9
(7,135 Views)

I tried looking at that example with no end result.

I have an array for each axis that i want to plot. When i input the array, the Z coordinate asks for a 2D array, i want to input a 1D array for each axis, meaning XYZ

I do not want separate plots for each x,y,z coordinate. I want all the points to go on the same plot.

FredFred

0 Kudos
Message 3 of 9
(7,128 Views)
Usually in situations like this I start with replacing things. So I right-clicked on a blank area of your front panel, went to the Graph palette and selected the 3D Curve Graph control. That placed a 3D curve on the front panel and a subVI on the block diagram wired to this control. This subVI accepts 1D X, Y, and Z arrays, so I wired up your X, Y, and Z arrays and got a graph. Not sure if that's what you were looking for.
Message 4 of 9
(7,106 Views)

OK,

Thanks, I understand how to make a 3D curve graph, but I want to plot the data in a surface graph, how can i do so?

 

0 Kudos
Message 5 of 9
(7,097 Views)

FredFred wrote

"

Thanks, I understand how to make a 3D curve graph, but I want to plot the data in a surface graph, how can i do so?

"

If you open the link in reply #2 of the link Titou provided, you open a thread that explains everything and also provides an example.

Ben

Message Edited by Ben on 02-17-2006 01:32 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(7,091 Views)

i GOT IT WORKING!

It seems that if i want to use the invoke node for a surface graph. I will have to connect the array that will go into Z into W.

 

Thanks for everyhting....

0 Kudos
Message 7 of 9
(7,075 Views)


I have an array for each axis that i want to plot. When i input the array, the Z coordinate asks for a 2D array, i want to input a 1D array for each axis, meaning XYZ

I do not want separate plots for each x,y,z coordinate. I want all the points to go on the same plot.


Hello to all

 

I have exactly the same problem as FredFred, I want to draw a 3D surface using "3D Surface.vi" that is to say I want to input a 1D array for each axis, but the Z coordinate asks for a 2D array. The purpose of this graph is to represent a correction (Z axis) as a fonction of a couple of (x,y) coordinates (X&Y axis). The only way I find to solve this problem is to build manually the Z matrix containing the correction as follows :

x1y1cor   x1y2cor   x1y3cor   ...   x1yjcor

x2y1cor   x2y2cor   x2y3cor   ...   x2yjcor

...

xiy1cor    xiy2cor    xiy3cor     ...   xiyjcor

But it only fits to reality when the points (x,y) are regullarly spaced (like a grid), moreother the scale of the X&Y axis does not correspond to the reality.

 

I read in the previous post that FredFred find a solution by connecting the array that will go into Z into W, but when I opened the "3D Surface.vi", the W array correspond also to a 2D Matrix (and wMatrix is grayed).

 

Thanks for your help.

 

Ps : I tried to be as clear as possible but my english is limited 😛 , so don't hesitate if you don't understand or if you need more explanations.

0 Kudos
Message 8 of 9
(6,780 Views)

I just find the solution here :

http://forums.ni.com/ni/board/message?board.id=170&message.id=5341&query.id=101249#M5341

I was using the Plot3DSurface method instead of the Plot3DMesh method .


If the data is in an ordered grid you can look at the sample VIs that ship
with LabVIEW. The sample VIs use the Plot3DSimpleSurface or Plot3DSurface
methods on the 3D graph (It is an ActiveX control).

However, if your data is not ordered you can use the Plot3DMesh method (use
the ActiveX invoke method) to create a surface. The Plot3DMesh method takes
three 1D vectors of data - X, Y, and Z (plus an optional fourth W vector) -
and triangulates a surface.

Thanks to Aaron 🙂

0 Kudos
Message 9 of 9
(6,771 Views)