MathGroup Archive 2007

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

Search the Archive

Re: Making sense of Directive[ ]


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[ ]