LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XYZ graph

Solved!
Go to solution

I'm having some issues trying to plot 3D data.

Ideally, I would like a surface plot, but I'm not sure I'm going about it correctly.

I have three 1D arrays of equal length: x, y, z.

 

The '3D surface graph' vi wants inputs of:

- x vector

- y vector

- z matrix

 

I dont have a z matrix, I have an array.


So instead, I am using '3D line graph'.

I only want to see the points like this:

 

points.PNG

 

But I am getting this:

 

line.PNG

 

The only way I got the top image is if I was dragging the plot around with my mouse.

Does anyone know how to remove the lines, so only the points are plotted?
Or better yet, how I could make a surface plot without a z-matrix?

Cory K
0 Kudos
Message 1 of 11
(15,044 Views)

Can you attach a data set.

It looks like the data is a helix.  Is the surface you're looking for a cylinder?

 

 

On an unrelated note, why are you a Yankees fan and going to Michigan State?

Message Edited by elset191 on 08-17-2009 02:29 PM
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 2 of 11
(15,038 Views)

Can you attach a data set.


I attached some sample data. Thanks for looking at it.

 


On an unrelated note, why are you a Yankees fan and going to Michigan State?


I was born and raised in NY, I just came out to MSU for college.

Go Yankees!!!

Cory K
0 Kudos
Message 3 of 11
(15,034 Views)

First, I recommend using the 3D Graph that is under the classic palette, not the one in Modern (as of 8.6)

 

To get dots instead of lines, just right click and hit cwgraph3d properties >  Plots. then change the plot from line to dots.

Message Edited by elset191 on 08-17-2009 02:39 PM
--
Tim Elsey
Certified LabVIEW Architect
0 Kudos
Message 4 of 11
(15,028 Views)

It looks like the data is a helix.  Is the surface you're looking for a cylinder?


 

No, the surface isnt going to be a cylinder.

The function is :
z = f(x,y)

 

x is roughly linear

y is roughtly 1/n

 

So it should look like a ..... ramp, for lack of better description

I'm going to have to figure out a fit to the data, but that will be an entirely different problem

Cory K
0 Kudos
Message 5 of 11
(15,027 Views)

You could try wiring the 1d array, I think it will adapt.

 

Try downloading the codeI posted in this thread.

 

 

 

That example does multiple surfaces and mulitple lines to do this.

 

Ben

 

PS I count myself as part New-Yorker. My Father grew up there (New Rochelle) and my family lived there while my Father was being transfered between bases.

Message Edited by Ben on 08-17-2009 02:42 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 11
(15,024 Views)

Ben wrote:

You could try wiring the 1d array, I think it will adapt.

 

Try downloading the codeI posted in this thread.


 

@Ben:

Which 1D array would I wire in?

 

Your VI would like an input of a 3D string array.
How can I make a 3D array out of 3 1-D arrays?

I dont think a Build Array would be correct.

Cory K
0 Kudos
Message 7 of 11
(15,014 Views)

The original posters data was in 3d so that what you see there.

 

Maybe this will be easier to start with.

 

 

 

It draws the car body shown above starting with a handfull of values in a control. You can change the values manually and watch what part of the image changes.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 11
(15,009 Views)
Solution
Accepted by topic author Cory_K

Ya?  

untitled.PNG

 

I'm not sure what the deal is with that bump...

 

Oh, and it's rotated.  I just assumed the first column was x then y then z. 

Message Edited by elset191 on 08-17-2009 03:00 PM
--
Tim Elsey
Certified LabVIEW Architect
Message 9 of 11
(15,004 Views)

Perfect Tim, thanks a ton.

 

And thanks for the VI Ben, thats pretty cool.

Cory K
0 Kudos
Message 10 of 11
(14,993 Views)