MathGroup Archive 2003

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

Search the Archive

Re: Options in ListPlot and Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38639] Re: Options in ListPlot and Plot
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 3 Jan 2003 00:14:50 -0500 (EST)
  • References: <auu9q7$les$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"David Park" <djmp at earthlink.net> wrote in message
news:auu9q7$les$1 at smc.vnet.net...
> Mike,
>
> Attributes[ListPlot]
> {Protected}
>
> Attributes[Plot]
> {HoldAll, Protected}
>
> I do not know why Mathematica is inconsistent here.
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>
>

David,

One reason for Plot being  HoldAll is to localize the variable:

    x=3;

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

        - Graphics -

    ClearAttributes[Plot,HoldAll]

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

        Plot::itraw:Raw object 3 cannot be used as an iterator.

        Plot[3,{3,0,1}]

    SetAttributes[Plot, HoldAll]

HoldAll is not needed in ListPlot since no working variable is used.
--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565






  • Prev by Date: Re: Heads
  • Next by Date: Re: Heads
  • Previous by thread: Re: Options in ListPlot and Plot
  • Next by thread: RE: RE: Options in ListPlot and Plot