Re: plot on condition
- To: mathgroup at smc.vnet.net
- Subject: [mg56270] Re: plot on condition
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Wed, 20 Apr 2005 05:32:36 -0400 (EDT)
- 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 One way to do this in version 5.1 would be Show[Block[{$DisplayFunction = Identity}, {ListPlot[Pick[pnts, (3 == #1 & ) /@ cnd], PlotStyle -> Blue], ListPlot[Pick[pnts, (3 != #1 & ) /@ cnd], PlotStyle -> Green]}]]; -- To reply via email subtract one hundred and four