Re: Passing options through user-defined functions

*To*: mathgroup at smc.vnet.net*Subject*: [mg58985] Re: Passing options through user-defined functions*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Tue, 26 Jul 2005 04:01:51 -0400 (EDT)*Organization*: The Open University, Milton Keynes, England*References*: <dc1tg8$54u$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Joe Christy wrote: > I have a function implemnted as module which uses various builtin > functions. What is the best way to pass options to the builtin functions? > > For example, I have something like > > foo[p,q]:= > Module[ > {bar}, > bar=Table[ > f[x,y], > {x,1,p},{y,1,q} > ]; > ArrayPlot[bar] > ] > > and I would like to be able to write something like > > foo[3,5, size -> 100] > > and see the results of ArrayPlot[bar, ImageSize->{3*100,5*100}] Hi Joe, Have a look at the package Utilities`FilterOptions` http://documents.wolfram.com/mathematica/Add-onsLinks/StandardPackages/Utilities/FilterOptions.html Best regards, /J.M.