MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: experimental set of points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33188] Re: [mg33174] experimental set of points
  • From: BobHanlon at aol.com
  • Date: Thu, 7 Mar 2002 02:23:39 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 3/6/02 3:04:58 AM, jfuentes at ff.oc.uh.cu writes:

>I have the following problem: An experimental set of points, which have
>each three coordinates Y,x1 and x2 and I did with the Fit or Regress
>functions the fit of the points succesfully. Now I want to plot the
>function and the points. The fitting function was plotted with the
>Plot3D but I could'n figure out how to plot the set points. ListPlot3D
>gave an error message that the point could have only two coordinate.
>Any hint will help me.

Needs["Graphics`Graphics`"];
Needs["Graphics`Graphics3D`"];
Needs["Graphics`Colors`"];

data = Flatten[Table[{x1, x2, Sin[x1*x2]}, 
        {x1,0,Pi,Pi/4},{x2,0,Pi,Pi/4}],1];

DisplayTogether[
    Plot3D[Sin[x1*x2],{x1,0,Pi},{x2,0,Pi},
 
      PlotPoints->25],
    Show[Graphics3D[{
          AbsolutePointSize[4],
          Red,Point/@data}]]];

or

DisplayTogether[
    Plot3D[Sin[x1*x2],{x1,0,Pi},{x2,0,Pi},
 
      PlotPoints->25],
    ScatterPlot3D[data,
 
      PlotStyle->{AbsolutePointSize[4],Red}]];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: experimental set of points
  • Next by Date: Re: Creating pdf on Mac OSX
  • Previous by thread: Re: experimental set of points
  • Next by thread: problem with contourplot in the book Optimization methods