[Date Index] [Thread Index] [Author Index]
Re: Inheriting options - is there a way?
Hi, > Is there a way to define a function so that it will inherit all the options - > or a spcified subset of the options - of some other function - either another user defined function or a built-in Mathematica function - without explicity having to define all the optoins that are inherited? The following will make f inherit all options of Plot and the default values that are set at the time this is executed: Options[f]=Options[Plot] Test: f[OptionsPattern]:=OptionValue[Ticks] f[Ticks->None] One could try to use SetDelayed (:=) so that the defaults for f's options reflect the current settings of Plot, but this works only until one does a SetOptions[f,...]. To make the behaviour more consistent in that case would require some extra work... hth, albert