LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Plot including origin (0,0,0) by default?

Solved!
Go to solution

I am trying to plot some 3D data on a contour plot, and for some reason, the plot seems to always want to include the origin (0,0,0), even if it is not included in the data set. As a result, my contour surface ends up looking kinda wonky. It helps that I manually set the axis limits (using the Array Min/Max calls to bound the datasets) and enabled Clipping on the graph, but the contour still kind of folds over on itself:

 

3D Plots.PNG

 

In the above image, the scatter plot on the right shows the actual data set used (except for the phantom (0,0,0) point that I did not pass to the graph helper), and the contour plot on the left shows the resulting "wonkiness" of the contour foldover as a result of that phantom point.

 

Has anyone run into this problem before? Is there an easy fix for it? I suppose I could offset all the data points in the x-direction--that seems to be the problem: my x values range from 750 - 1000, whereas my y- and z-values all start roughly around zero--but then my axis value labels will be screwed up....

 

Any ideas would be greatly appreciated.

0 Kudos
Message 1 of 5
(5,149 Views)

Hmmmm...

Did you check the data you passed  to the 3D graph ? It's so easy to have an additionnal element added to the series that this could be the reason for your problem.

If not so, could you attach a set of data for us to play with ? 

Message Edité par chilly charly le 05-29-2010 10:50 AM
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 5
(5,130 Views)

Yes, I have seen this problem.

 

You may also notice that if your surface is all on the same plane (same z) without the 0,0 (in these cases I have had to manually include 0,0) you will see nothing in the 3D graph..

0 Kudos
Message 3 of 5
(5,118 Views)

@Charly -- yes, I did check the data I passed to the 3D Plot helper, and the point {0,0,0} was definitely not included in the data set.

 

@battler. -- the data points, as you can see, are not all included in the same plane. There are multiple different z-values (as well as x- and y-values). But that is interesting that you have run into such a problem. I suppose it might be related...

0 Kudos
Message 4 of 5
(5,082 Views)
Solution
Accepted by topic author TurboPhil

Nevermind. I found the problem. I was autoindexing through a 1D within a for loop to populate my scatter matrices, but the 1D array length was not the same for each iteration of the calling for loop. Hence, the 1D array elements of the resulting 2D matrices were padded to be of the same length. [When I double-checked earlier, I was still looking at the original 1D arrays].

 

Thanks for the feedback, anyway!

0 Kudos
Message 5 of 5
(5,070 Views)