Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: yet another Evaluate question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125501] Re: yet another Evaluate question
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 15 Mar 2012 00:37:36 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201203140540.AAA25754@smc.vnet.net>

Because Plot has attribute HoldAll.

Attributes[Plot]

{HoldAll, Protected}



Bob Hanlon

On Wed, Mar 14, 2012 at 1:40 AM, Alan <alan.isaac at gmail.com> wrote:
> Why does the following require using ``Evaluate`` to get the correct
> plot legend?
>
> Thanks,
> Alan Isaac
>
> Needs["PlotLegends`"]
> plotfuncs = {a*x, a*x + b} /. {a -> 1.0, b -> 1.0}
> Plot[Evaluate[plotfuncs], {x, 0, 1},
>  PlotStyle -> {Red, Blue},
>  PlotLegend -> {"first", "second"}]
>



--
Bob Hanlon



  • Prev by Date: Re: Rationalized Fitting
  • Next by Date: Re: Mathematica loop help
  • Previous by thread: yet another Evaluate question
  • Next by thread: Re: yet another Evaluate question