MathGroup Archive 2008

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

Search the Archive

Re: Give a list of options in Mathematica 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84634] Re: Give a list of options in Mathematica 6
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Mon, 7 Jan 2008 06:32:20 -0500 (EST)
  • References: <flslng$ps9$1@smc.vnet.net>

Giacomo Ciani schrieb:
[*** snipp ***] 
> Noe I'm unable to replicate this in mathematica 6. Cut and paste of a
> sample notebook:
>
> In[65]:= opts = {PlotRange -> {0, 1}, AxesOrigin -> {0, 0.5}}
>
> Out[65]= {PlotRange -> {0, 1}, AxesOrigin -> {0, 0.5}}
>
> In[66]:= Plot[x, {x, 0, 1}, opts]
>
> During evaluation of In[66]:= Plot::nonopt: Options expected (instead
> \
> of opts) beyond position 2 in Plot[x,{x,0,1},opts]. An option must be
> \
> a rule or a list of rules. >>
[*** snipp ***]

Giacomo,
use

Plot[x, {x, 0, 1}, Evaluate[opts]]

Sometimes I found that I needed Evaluate[Flatten[opts]]

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Give a list of options in Mathematica 6
  • Next by Date: Re: Give a list of options in Mathematica 6
  • Previous by thread: Re: Re: Give a list of options in Mathematica 6
  • Next by thread: Re: Re: Give a list of options in Mathematica 6