MathGroup Archive 2005

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

Search the Archive

Re: plot on condition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56260] Re: plot on condition
  • From: Peter Pein <petsie at arcor.de>
  • Date: Wed, 20 Apr 2005 05:32:02 -0400 (EDT)
  • References: <d42lcj$3lb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> 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
> 
Show[Graphics[Prepend[
      Transpose[{cnd/.{3->Blue,c_Integer->Green},Point/@pnts}],
      PointSize[.02]]]]

will do it. Prepend[..,PointSize[.02]] is of course not necessary.
-- 
Peter Pein
Berlin


  • Prev by Date: Re: plot on condition
  • Next by Date: Re: plot on condition
  • Previous by thread: Re: plot on condition
  • Next by thread: Re: plot on condition