MathGroup Archive 2005

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

Search the Archive

Re: plot on condition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56295] Re: plot on condition
  • From: "Mariusz Jankowski" <mjankowski at usm.maine.edu>
  • Date: Thu, 21 Apr 2005 05:36:14 -0400 (EDT)
  • Organization: University of Southern Maine
  • References: <d42lcj$3lb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Something like the following will work:

gr = If[#[[1]] == 3, {Red, #[[2]]}, {Blue, #[[2]]}] & /@ Thread[{cnd, Point
/@ pnts}]}

then 

Show[Graphics[{PointSize[0.1], gr ]]


Mariusz




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: removing sublist . Again and Different
  • Next by Date: Re: (x-y) DiracDelta[x-y] does not simplify to 0
  • Previous by thread: Re: plot on condition
  • Next by thread: Exact Symbolic Notation