MathGroup Archive 2011

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

Search the Archive

Re: Grid Divider Style With Background Colors


That was a wonderful solution.  Many thanks.


-----Original Message----- 
From: Heike Gramberg
Sent: Monday, July 25, 2011 5:19 AM
To: Don
Cc: mathgroup at
Subject: [mg120545] Re: Grid Divider Style With Background Colors

You could do something like

With[{gap = 1, elemWidth=3, h = 8, w = 7},
mat = RandomInteger[10, {h, w}];
colours = Table[Blend[{Lighter[Blue], Pink}, j/w], {i, h}, {j, w}];
    Framed[Pane[#1, Scaled[1]], ImageMargins -> gap,
      Background -> #2] &, {mat, colours}, 2], Spacings -> {0, 0},
   ItemSize -> elemWidth], FrameMargins -> gap]]

elemWidth is the width of the elements in the Grid and gap the distance 
between the lines.


On 25 Jul 2011, at 12:28, Don wrote:

> Mathematica  permits divider lines between rows and columns in a table
> (grid)  such
> as this example from the documentation:
> Grid[Table[x, {4}, {11}], Dividers -> {{{{True, False}}, -1 -> True},
> False}]
> But, the dividers are single lines only.
> Sometimes  double line dividers are desired
> as shown in this table on the Web:
> Notice that the background color for an item  is only within
> the inside line of a double line divider.
> Is there any way to produce (a) this  kind of divider (double line)
> and (b) with background colors for specific items that don't cross
> the inside line of the double line divider?
> Thank you in advance.
> Don

  • Prev by Date: Re: And now for something completely different
  • Next by Date: Re: how to ListPlot3D large data sets
  • Previous by thread: Re: Grid Divider Style With Background Colors
  • Next by thread: Can't make Input[] work the way I want it to.