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

MathGroup Archive 2009

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

Search the Archive

Re: passing both arbitary and defined options

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98490] Re: passing both arbitary and defined options
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 10 Apr 2009 05:00:02 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <grkgnp$6t0$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

the old package FilterOptions` is the bes solution, the new
clumsy FilterRules[] should do the same in a more long winded way.

Regards
   Jens

Eddie wrote:
> So I'm building a plotting function, and I want it to be able to inherit the same options that a ListPlot[] command can inherit, so my prototype looks like this:
> 
> NewPlot[data_List,options___Rule]:=Module[{},blah
> blah
> blah
> ListPlot[fancy stuff,options]
> ]
> 
> Here's the rub, if I additionally want to create a NewPlot-specific option, it doesn't mesh.  For example:
> 
> NewPlot[data_List,OptionsPattern[{newOption->newValue}],options___Rule] := etc
> 
> Options contains the rule for newOption when NewPlot is called with that option utilized, and ListPlot throws an error because it's not a recognized option for ListPlot.
> 
> Is there a way I can have my personally declared options and the wildcard options both present and working?  Is there a way to "Drop" the rule that matches the user-defined option from 'options'?
> 


  • Prev by Date: Re: passing both arbitary and defined options
  • Next by Date: Why does ImageCompose degrade the result and can you do anything
  • Previous by thread: Re: passing both arbitary and defined options
  • Next by thread: Re: passing both arbitary and defined options