Re : plot on condition

• To: mathgroup at smc.vnet.net
• Subject: [mg56228] Re : [mg56218] plot on condition
• From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
• Date: Wed, 20 Apr 2005 05:29:58 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Hello !

Simple way :

In[1]:=
pnts={{1,2},{5,4},{3,2},{2,6},{5,3}};
cnd={7,3,5,8,3};

In[2]:=
liste = Transpose[{pnts, cnd}];

In[3]:=
Show[Graphics /@ liste /. {a_, c_} ->
If[c == 3, {RGBColor[0, 0, 1], PointSize[0.02],
Point[a]}, {RGBColor[0, 1, 0], PointSize[0.02],
Point[a]}]];

Regards

F.Jaccard
-----Message d'origine-----

hello
my question about plotting a list of points but with some condition depends on
the status of points in other list;
pnts={{1,2},{5,4},{3,2},{2,6},{5,3}};
cnd={7,3,5,8,3};
the condition is: plot a point in list "pnts" in Blue if the corresponding
element in list "cnd" is 3 else plot in Green
regards

```

• Prev by Date: Re: plot on condition
• Next by Date: Re: match 1, replace 2
• Previous by thread: Re: Re: Exact Symbolic Notation
• Next by thread: Re: Integrating a complicated expression involving Sign[...] etc.