[Date Index]
[Thread Index]
[Author Index]
Re: A Question About Directive
*To*: mathgroup at smc.vnet.net
*Subject*: [mg111220] Re: A Question About Directive
*From*: Murray Eisenberg <murray at math.umass.edu>
*Date*: Sat, 24 Jul 2010 05:05:55 -0400 (EDT)
Fewer keystrokes is not the sole metric for simplicity! Code readability
is another.
On 7/23/2010 7:09 AM, Kevin J. McCann wrote:
> A couple have responded with something like Mark's example below. Is
> this really worth a new function and more keystrokes over:
>
> Plot[{Cos[x], Sin[x]}, {x, 0, 2 Pi},
> PlotStyle -> {{Thick, Red}}]
>
> Kevin
>
> 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
>>
>
--
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: surprising comparison of Mathematica 5.2 and 7.0**
Next by Date:
**Re: A Question About Directive**
Previous by thread:
**Re: A Question About Directive**
Next by thread:
**Re: A Question About Directive**
| |