MathGroup Archive 2007

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

Search the Archive

Re: Making sense of Directive[ ]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75813] Re: [mg75776] Making sense of Directive[ ]
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 11 May 2007 05:25:54 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200705100916.FAA08126@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

The docs give some good examples of one use of Directive: to avoid 
nested graphics directives.  Thus the example

   Plot[{Sin[x],Cos[x]},{x,0,10},
      PlotStyle->{Directive[Red,Dashed],Directive[Blue,Thick]}]

from the "home page" of Directive, although wordier, is to my eye 
easier to read than the equivalent:

   Plot[{Sin[x],Cos[x]},{x,0,10},
      PlotStyle->{{Red,Dashed},{Blue,Thick}}]

The longer and more numerous the directives are for the various elements 
of a plot or graphic, the more useful Directive becomes in untangling 
the syntax for the eye.


Forex Ample wrote:
> I stumbled upon the new Directive[ ] function, used to group Graphics 
> directives into one compound directive. However, I fail to see what it is 
> good for. In every example in the documentation, replacing Directive with 
> List seems to produce the exact same results. Anybody got a clue?
> 
> Greetz, Naz 
> 
> 
> 

-- 
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: Date data type in Version 6
  • Next by Date: Re: Can anyone help me Thanks
  • Previous by thread: Making sense of Directive[ ]
  • Next by thread: Re: Re: Making sense of Directive[ ]