06-25-2013 05:08 PM
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
06-25-2013 05:57 PM
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
06-26-2013 01:52 PM - edited 06-26-2013 01:55 PM
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
06-27-2013 03:05 AM
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 ?
06-27-2013 05:02 AM
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
06-27-2013 05:40 AM
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?
06-27-2013 12:09 PM
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
06-28-2013 02:25 AM
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?
06-29-2013 11:52 AM
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
06-29-2013 02:34 PM - edited 06-29-2013 02:36 PM
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:
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