MathGroup Archive 2006

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

Search the Archive

Re: Plot {x,y} and {x,z} of a List {x,y,z}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65817] Re: [mg65694] Plot {x,y} and {x,z} of a List {x,y,z}
  • From: bsyehuda at gmail.com
  • Date: Mon, 17 Apr 2006 02:29:13 -0400 (EDT)
  • References: <200604160544.BAA07910@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
I'm not really sure if you want to "Fit" or to Plot (as defined in the titl=
e
of your post). Plot sounds more reasonable to me, so here are two options
for you (among many possibiities).
The first is with a Module and local variables and the other without
myFit1[l_List] := Module[{x, y, z}, {x, y, z} = l;
         Show[Graphics[{Line[{{x, y}, {x, z}}], PointSize[
        0.02], Point[{x, y}], Point[{
            x, z}]}]]];
myFit2[l_List] := Show[Graphics[{Line[{{
              l[[1]], l[[2]]}, {l[[1]], l[[3]]}}], PointSize[0.02],
Point[{l[[
              1]], l[[2]]}], Point[{l[[1]], l[[3]]}]}]]

Activate one of them and try, for example, myFit1[{1,2,3}]
yehuda
On 4/16/06, petitsun1 <r.bactavatchalou at mx.uni-saarland.de> wrote:
>
> Hi,
> I have a list of {x,y,z} and I would like to fit {x,y} and {x,z}.
> How can I do it?
> It must be easy but I have not found...
> Thanks, Ravi
>
>



  • Prev by Date: Re: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2
  • Next by Date: Re: normalization and square roots
  • Previous by thread: Plot {x,y} and {x,z} of a List {x,y,z}
  • Next by thread: Re: Plot {x,y} and {x,z} of a List {x,y,z}