MathGroup Archive 2007

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

Search the Archive

Re: Dividers formatting in Grid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83142] Re: Dividers formatting in Grid
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Tue, 13 Nov 2007 03:32:46 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fh9920$aue$1@smc.vnet.net>

Murray Eisenberg wrote:

> In the following Grid, why are the two vertical dividers not red?
> 
>     Grid[Join[{{"First", "Second", "Third"}}, Partition[Range[6], 3]],
>          Dividers -> {{None, 2 -> Red, 3 -> Red}, {2 -> Blue}}]
> 
> (On my Windows XP system with Mathematica 6.01, they are black.)
> 
> Note that in the following Grid, the single vertical divider IS red:
> 
>     Grid[Join[{{"First","Second"}},Partition[Range[4],2]],
>        Dividers->{{None,2->Red},{2->Blue}}]
> 
> Am I not understanding the syntax or semantics of the Dividers option?

It seems that the management of horizontal dividers is a little bit 
buggy. Anyway, replacing the rules for horizontal position management by 
a list of graphic directives at "hard-coded" positions works fine. 
(Note, as illustrated by the following example, that vertical dividers 
do not seem to suffer this bug.)

Grid[Join[{{"First", "Second", "Third"}}, Partition[Range[12], 6]],
  Dividers -> {{None, Red, Directive[Red, Dashing[2]],
     Directive[Thickness[5], Green], None, None, Orange}, {2 -> Blue,
     3 -> Directive[Thickness[3], Orange], -1 -> Pink}}]

You can see the result at

http://homepages.nyu.edu/~jmg336/mathematica/dividers.pdf

Regards,
-- 
Jean-Marc


  • Prev by Date: Re: Pattern test and expression sequence
  • Next by Date: Re: Dividers formatting in Grid
  • Previous by thread: Re: Dividers formatting in Grid
  • Next by thread: Re: Dividers formatting in Grid