05-28-2010 09:48 AM
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:
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.
Solved! Go to Solution.
05-29-2010 03:50 AM - edited 05-29-2010 03:50 AM
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 ?
05-29-2010 06:18 AM
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..
06-01-2010 06:51 AM
@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...
06-01-2010 11:17 AM
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!