1
$\begingroup$

I'm trying to plot this Plot[Fit[med,{1,x},x],{x,0,10}] Why this doesn't work? I find out that if I do Plot[Evaluate@Fit[med,{1,x},x],{x,0,10}] works fine. But can somebody explain me why this happens in first place?

$\endgroup$
0

1 Answer 1

4
$\begingroup$

Plot has attribute HoldAll, therefore the expression Fit is hold in an unevaluated form.

Using

Attributes@Plot

(* out *)
{HoldAll, Protected}

reveals the attributes

$\endgroup$
2
  • $\begingroup$ Thanks, and why this is useful? I mean, the holdall $\endgroup$
    – Kafkarudo
    Aug 23, 2014 at 13:46
  • $\begingroup$ Sometimes we don't want the argument to be evaluated at once, please have a look at the examples given by documentation center $\endgroup$
    – hieron
    Aug 23, 2014 at 13:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.