Re: A Question About Directive

*To*: mathgroup at smc.vnet.net*Subject*: [mg111236] Re: A Question About Directive*From*: "Kevin J. McCann" <Kevin.McCann at umbc.edu>*Date*: Sat, 24 Jul 2010 05:08:56 -0400 (EDT)*References*: <i2btei$bff$1@smc.vnet.net>

I remain unconvinced. As I said earlier, I don't think that the examples I have seen do much more than replace the extra wiggly brackets, "{}", with more keystrokes "Directive[]". I don't find it easier to read. My original post was not to say that the examples you show are not valid, I just wondered if the folks at Wolfram went to the trouble of defining a new function for more than just that. As far as Total goes, that is much more intuitive than Plus @@, but the use of the word Directive, at least to me, is not intuitive and requires that I look it up in the Help. Kevin Murray Eisenberg wrote: > Good example! Of course one _could_ still dispense with Directive in the > first one, using instead... > > Plot[{Cos[x], Sin[x]}, {x, 0, 2 Pi}, PlotStyle -> {{Thick, Red}}] > > ... with the nested PlotStyle value. And here, too, the point is that > Directive provides a convenience of eliminating nested braces. > > Just because a function such as Directive in such situations is a mere > convenience and not indispensable does not militate against its > existence. After all, some other newer functions such as Total or > Accumulate are also dispensable but nonetheless conveniences. > > If you want to stick with fewer functions, just go ahead and use the > nested parentheses. > > On 7/22/2010 5:42 AM, Mark McClure wrote: >> On Mon, Jul 19, 2010 at 2:10 AM, Kevin J. McCann<kjm at kevinmccann.com> wrote: >>> I have noticed the use of Directive in some of the graphics examples >>> from Bob Hanlon, David Park, and others. I am curious about this >>> command, since it does not appear to do much that is new. >>> ... >>> So, what is the benefit of Directive? >> Try >> Plot[{Cos[x], Sin[x]}, {x, 0, 2 Pi}, >> PlotStyle -> Directive[Thick, Red]] >> vs >> Plot[{Cos[x], Sin[x]}, {x, 0, 2 Pi}, >> PlotStyle -> List[Thick, Red]] >> >> Mark McClure >> >