MathGroup Archive 2005

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

Search the Archive

Re: Passing options through user-defined functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58995] Re: [mg58967] Passing options through user-defined functions
  • From: "Yasvir A. Tesiram" <tesiramy at omrf.ouhsc.edu>
  • Date: Tue, 26 Jul 2005 04:02:19 -0400 (EDT)
  • References: <200507250530.BAA05222@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com


Needs["Utilities`FilterOptions`"]

foo[p_, q_, opts___]:= Module[{},

 	myopts = FilterOptions[ArrayPlot, opts];

 	ArrayPlot[var, myopts];

]




On Mon, 25 Jul 2005, 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}]
> -- 
> ============================= Joe Christy ==============================
> ------------------ http://public.xdi.org/=joe.christy ------------------
> == If I can save you any time, give it to me, I'll keep it with mine. ==
>


  • Prev by Date: Re: Passing options through user-defined functions
  • Next by Date: Re: How to plot individual 2D data points, where each must have its own color.
  • Previous by thread: Re: Passing options through user-defined functions
  • Next by thread: Re: Passing options through user-defined functions