Re: Vary PlotStyle in ListPlot ?
- To: mathgroup at smc.vnet.net
- Subject: [mg90046] Re: [mg90005] Vary PlotStyle in ListPlot ?
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 27 Jun 2008 06:16:49 -0400 (EDT)
- Reply-to: hanlonr at cox.net
data = RandomReal[{0, 1}, {10000, 2}]; regionTest[{x_, y_}] := 0.2 < x < 0.5 && 0.4 < y < 0.7; ListPlot[{Select[data, regionTest[#] &], Select[data, ! regionTest[#] &]}, PlotStyle -> {Red, Blue}, AspectRatio -> 1] Bob Hanlon ---- "Coleman wrote: > Greetings, > > I'm producing ListPlots with a large number (>100000) pairs of points. > Is there a way to vary the PlotStyle in a single ListPlot command, so > that sets of points in a certain region are a different color or Opacity > than points outside the region? This is simple using Show and individual > ListPlots, but I'm wondering if it can be done within a single ListPlot > command. > > > Thanks, > > Mark >