Re: Functions with Options
- To: mathgroup at smc.vnet.net
- Subject: [mg31988] Re: Functions with Options
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sat, 15 Dec 2001 01:30:06 -0500 (EST)
- References: <9vdsg5$540$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Guillerm. You need max_ instead of max, and ___ (three underscores) instead of __ (two underscores) to allow for no options being used. -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 <guillerm at usal.es> wrote in message news:9vdsg5$540$1 at smc.vnet.net... > I would like build functions with Options calling Mathematica functions with > the same options. > > Here is a naïf example > > newPlot[f_, {x_, min_, max}, opts__] := Plot[f, {x, min, max}, opts] > > But it doesn`t work. > > newPlot[Sin[x], {x, 0 , 2 Pi}, Axes -> False, AspectRatio -> Automatic] > > newPlot[Sin[x], {x, 0 , 2 Pi}] > > > Any > help? > > --------------------------------------------- > This message was sent using Endymion MailMan. > http://www.endymion.com/products/mailman/ >