MathGroup Archive 2004

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

Search the Archive

Re: List plotting a vector field containing invalid data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52156] Re: List plotting a vector field containing invalid data
  • From: Peter Pein <petsie at arcor.de>
  • Date: Fri, 12 Nov 2004 02:14:29 -0500 (EST)
  • References: <cmvebb$shp$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Gareth Owen wrote:
> I'm solving a 2D CFD problem, which is generating a lot of co-located 2D
> velocity field data, using a regular rectangular grid.  Some of the grid is
> masked out, representing ocean bottom topography.
> 
> Is there a relatively simple way to modify ListPlotVectorField to ignore the
> masked out values (which are stored as as unphysically large values, but this
> is easily modified)
> 
> Thanks.
> 
Let's assume your data is in "data" and the unphysically large values 
are >= "nonsense". Then

Block[{$DisplayFunction = Identity},
   rawplot = ListPlotVectorField[data]
];

finalplot =
   rawplot /. {Arrow[{x1_, y1_}, {x2_, y2_}, r___]} /;
       (x2 - x1)^2 + (y2 - y1)^2 >= nonsense^2
     -> {GrayLevel[1], Point[{x1, y1}]};
Show[finalplot];

should be an iteration for your desired result.
-- 
Peter Pein
Berlin


  • Prev by Date: Re: List plotting a vector field containing invalid data
  • Next by Date: Re: equal distribution of last digits base ten in the primes by b-normality
  • Previous by thread: Re: List plotting a vector field containing invalid data
  • Next by thread: Akiyama-Thurston [1,5] minimal Pisot tile