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
>
>
- References:
- Plot {x,y} and {x,z} of a List {x,y,z}
- From: "petitsun1" <r.bactavatchalou@mx.uni-saarland.de>
- Plot {x,y} and {x,z} of a List {x,y,z}