MathGroup Archive 2012

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

Search the Archive

Re: List & Plot: do they parse options differently?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128182] Re: List & Plot: do they parse options differently?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 22 Sep 2012 02:45:45 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120921081425.495C56854@smc.vnet.net>

On Sep 21, 2012, at 4:14 AM, James Stein <james at stein.org> wrote:

> ...I fail to see why the call to Plot fails here:
>
> Clear [ s ] ;
> s = ImageSize -> Small;
> Plot [ x,  { x, 0, 3 } ,  s ]


I believe this behavior results from Plot having the attribute HoldAll. The same thing will happen for any other option (which is just an additional argument that happens to take the form of a Rule).

Just force Plot to explicitly evaluate that argument:

   Plot[x, {x, 0, 3}, Evaluate[s]]

---
Murray Eisenberg                                     
murray at math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                  413 545-2859 (W)
710 North Pleasant Street                      fax   413 545-1801
Amherst, MA 01003-9305








  • Prev by Date: Re: primitive root error
  • Next by Date: Re: creating a graphic in a text cell
  • Previous by thread: List & Plot: do they parse options differently?
  • Next by thread: Re: List & Plot: do they parse options differently?