MathGroup Archive 2010

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

Search the Archive

Re: A Question About Directive

  • To: mathgroup at
  • Subject: [mg111281] Re: A Question About Directive
  • From: Mark McClure <mcmcclur at>
  • Date: Mon, 26 Jul 2010 06:37:14 -0400 (EDT)

On Fri, Jul 23, 2010 at 7:09 AM, Kevin J. McCann <Kevin.McCann at> wrote:
> I'll agree that your example with the use of the Inner product is a clever
> way to do that, but isn't this way more readable?
> Graphics[{
> Red,PointSize[Large],Point[{0,0}],
> Blue,PointSize[Medium],Point[{1,0}]
> },
> AspectRatio->1/10]

Certainly, I'm not suggesting that one should use Inner and Directive
to place a couple of differently colored and sized dots in a picture!
I do a fair amount of graphics programming and, in that context, it
can be convenient to have a head that indicates Graphics directives.
Here's another example:

 {Directive[Red], Point[{0, 0}]}],
 _Directive, Infinity]

This is a long winded way to create a single black dot.  While not the
most efficient way to do it, this code indicates the kind of thing
that one might do if one always enclosed directives in the Directive


  • Prev by Date: Re: de-nesting complex nested lists
  • Next by Date: Re: All pairs shortest paths
  • Previous by thread: Re: A Question About Directive
  • Next by thread: Re: A Question About Directive