Hi @shampton82 ,
I'm with @dlehman1 with this, as a line in 3D can always be decomposed into two independent variable like X & Y or Y & Z by a transformation of your coordination system, hence the unique plane that will contain that line. But your data seems to be something different. I still don't get the overall whole point of fitting the line in 3D. If you really have to, I guess I'd just change your coordinate system, as the plane containing the "3D" data is just along the X-Y diagonal.
In the case of the data you shared, it looks like you have profile measurements of something that are measured at regular intervals of 75 units (mm, um, nm?) in the z-direction. Looking at the x vs z and y vs z profiles, it really looks a lot like AFM data or something similar. And with X and Y being so strongly correlated, it's almost like it's just rastered a step of 231 units (in Y) -- the intercept in your fit Y by X graph -- and then the item is measured again.
One of the things that I don't really understand is what kind of information you are trying to get out of this program you use -- you mention that it fits a line through the 3D points and then gives a distance measurement from the best fit and the measured point? This is essentially looking at the residuals of the fit -- you're looking at how far away from your fit the data is. Are you trying to predict the residuals? Are you really trying to predict the Z value, or are you trying to predict the X and Y? The lines you fit in the data you shared are predicting X and Y, not Z.
There's a lot here I don't quite get, but I think it might be because you can't share everything. However the more you can share and keep anonymized, the closer we might get to helping you obtain the solution you're after.
Hope this helps!,
DS