MathGroup Archive 2004

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

Search the Archive

Re: Problem with transformation rules in Plot


Alain Cochard wrote:
> In[4]:= Plot[{f[x],g[x]}/.{a->1} , {x,0,1}]
> 
> Plot::plnr: {f[x], g[x]} /. {a -> 1} is not a machine-size real number at x = 

Hi Alain,

that's not a problem with the rule, it's the HoldAll attribute of Plot
("Plot evaluates its arguments in a non-standard way...").

try

    Plot[{f[x], g[x]} /. {a -> 1} // Evaluate, {x, 0, 1}]

see docs for Evaluate[], or mma-book ch. 2.6.5


Regards,
Marcus

-- 
God knows. Or guesses. -- John Irving


  • Prev by Date: Re: how to take quotation marks away ?
  • Next by Date: Re: Disabling Shadow Errors, XEmacs with Mathematica, coloring
  • Previous by thread: Re: Problem with transformation rules in Plot
  • Next by thread: Re: Problem with transformation rules in Plot