Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

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
> 



  • Prev by Date: Re: Re: font size too small
  • Next by Date: Re: 0.0 is different with 0?
  • Previous by thread: RE: Vary PlotStyle in ListPlot ?
  • Next by thread: Re: Vary PlotStyle in ListPlot ?