LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D-graph

Hello,

 

I have some XYZ-data which I want to plot as a 3D-graph. Labview can't seem to do this. For instance I need to put in X and Y-vectors and a 2D-array for Z-coordinates. So if I put in [1 2 3 4] as X and [1 2 3 4] as Y, I need to create a 2D-array for Z of 4x4, that gives a Z-value for every combination of X and Y. But I don't have Z-values for all combinations, I have an irregular shape. Is there another way to display 3D-surfaces in Labview?

 

Best regards

 

KF

0 Kudos
Message 1 of 15
(5,054 Views)

There are a number of ways to plot 3D graphs in LabVIEW.

 

First have a look through the numerous examples supplied with LabVIEW (Help > Find Examples... Search > enter '3D' as the keyword.)

 

Then you can search the forum for threads such as this:

http://forums.ni.com/t5/LabVIEW/3d-plot-tutorial-Step-1/m-p/1431698

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 15
(5,049 Views)

Hi TroyK,

t

Thanks for your reply, these threads are pretty advanced for me, I need a slower start. I added a VI with scattered plot. I think you can clearly see the surface plot I would like from this data. I'd also like changing colors with increasing Z, a cursor which gives you all coordinates when you move and the ability to scale the axes. I will also create 4D data lter, where I would like the fourth value to appaer as a changing colour

 

Best regards KF

0 Kudos
Message 3 of 15
(5,012 Views)

Hello KF2,

 

The advice of TroyK is really worth the look.It also isn't that complex when you take enough time to read through the explanations.

 

Coming back to your original 3D question, then you just have to go to the Help of the VI you're using.

 

When you read the help you will find out that the Option Plot Helper (Matrix) shows what you want according to your original post (X and Y 1D array and Z matrix).

 

Regarding the 4D issue.

How does your data look like?

4 x 1D Array ?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 15
(4,999 Views)

Hello ThiCop,

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LabVIEW-3D-Graphing-Options/idi-p/1683680 This explains my problem pretty well

 

Best regards

 

KF2

0 Kudos
Message 5 of 15
(4,987 Views)

I see what you mean.

 

You would like to have a version of the 3D Surface Plot VI that allows you to do just enter 3 x a 1D array, correct?

 

As far as I know this doesn't exist in the default Surface Plot VIs you're using.

When you specify a certain set of vectors (X,Y,Z) , then normally you would expect that one would also define the interpolation needed between the different points.

 

Which kind of Interpolation would you use to make a Surface from your set of Points?.

 

Basically you would just have to put a VI like this one (http://venus.ni.com/nisearch/app/main/p/q/Interpolate%202D%20Scattered/) between your 1D Vectors and the Surface Plot VI.

 

Can you let me know if this solves part A (3D surface plot) of your question?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 15
(4,982 Views)

Hi ThiCop,

 

I can't seem to reach the link, so I can't tst it. Yes, I will have 4 1D-vectors for the plot

 

best regards

 

KF

0 Kudos
Message 7 of 15
(4,967 Views)

Ah ok,

 

In the original post you seemed to eb talking about 3 vectors.

 

I had pasted the wrong link, here's the right one for the 3 x 1D vectors:

http://zone.ni.com/reference/en-XX/help/371361H-01/gmath/interpolate_2d_scattered/

 

For the 4D:

The fourth vector should define the color of the plot, right?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 15
(4,954 Views)

Hi,

 

I will try your suggestion, I attached 2 plots with data now, one for 3d and one for 4d. And the fourth vector should define the colour yes

 

Best regards

 

KF

Download All
0 Kudos
Message 9 of 15
(4,939 Views)

hi and sorry for hi-jacking this thread,

 

 

 

from my experience those 2d interpolation vi's work best when scaling the input to a range between 0 and 1:

 

 

scatter-surface.png

 

 

 

so, this task is feasible;

 

 

but I wonder if it was possible to scale the color ramp to a fourth dimension ("the fourth vector should define the colour")?!

 

 

 

 

Regards,
Alex

0 Kudos
Message 10 of 15
(4,930 Views)