Re: help with 3D scatter plot
- To: mathgroup at smc.vnet.net
- Subject: [mg41989] Re: help with 3D scatter plot
- From: "seferiad" <seferiad at pacbell.net>
- Date: Mon, 16 Jun 2003 03:56:43 -0400 (EDT)
- References: <bbroh0$j3e$1@smc.vnet.net> <bc46j5$ktd$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jens, Where/how do I imbed the statement regarding titles of the respective axes? Thanks, Jay "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> wrote in message news:bc46j5$ktd$1 at smc.vnet.net... > Hi, > > > data = Table[(xx = 2*Random[]; yy = 2*Random[]; {xx, yy, Sin[xx*yy]}), > {100}]; > > fitfun = Chop[Fit[data, {1, x, y, x*y}, {x, y}]]; > > > Block[{$DisplayFunction = Identity}, > g1 = Plot3D[Evaluate[fitfun], {x, 0, 2}, {y, 0, 2}]; > g2 = Graphics3D[{ > {AbsolutePointSize[4], Point /@ data}, > Line[{Append[Take[#, 2], 0], #}] & /@ data} > ]; > ] > Show[g1, g2] > > > Regards > Jens > > seferiad wrote: > > > > Hello, > > I have Mathematica 4 and have two questions. > > 1) I have a 3D scatter plot, and I would like to do a least squares fit to > > the data, and display the R^2 value. Since the graph is 3D, the curve fit > > should be a surface. I don't think I can do this conveniently, has anyone > > found a work around for this? > > > > 2) Also, it is difficult to visualize the location of the data in the plot, > > with or without the grids. I once saw another graph (it may have been Igor > > software?) in which each of the data points were attached to lines that were > > parallel to the z-axis and stopped at the x-y plane. This is a very nice > > feature. Is there something equivalent in Mathematica to help improve with > > being able to visualize the graph? Thanks, Jay >