Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to display a table like this:

enter image description here

And use Divider I can only get this so far

t=Table[x, {10}, {10}];    
     Dividers -> {{{{True, False}}, {-1 -> False, 
         1 -> False}}, {{{True, False}}, {-1 -> False, 1 -> False}}}]

enter image description here

How can I remove the extra part of the divider?

share|improve this question
Related: mathematica.stackexchange.com/q/4383/121 –  Mr.Wizard May 2 '13 at 1:27

2 Answers 2

up vote 7 down vote accepted

Slightly less dirty:

d = 10;
t = Table[x, {d}, {d}];
Grid[MapAt[Item[#, Frame -> White] &, t, Tuples[{Range@d, {-2, -1}}]],
     Dividers -> {#, #} &@Thread[(# -> Black &)[Range[3, d, 2]]]]

enter image description here

share|improve this answer
+1, however I recommend Frame -> None as this will work even if the background is not white, and it avoids altering the spacing which Frame otherwise does. –  Mr.Wizard May 2 '13 at 1:29
@belisarius I'm confused about the negative numbers in Tuples[{Range@d, {-2, -1}}], and wondering how does it affect MapAt? I read the documentation of MapAt and did not see the case for negative numbers appear. –  Lawerance Jul 23 at 6:03

This is something of a hack because I had to adjust the Dashing parameters by eye, but maybe it will give you an idea you can chew on.

t = Table[x, {10}, {10}];
  Dividers -> 
    {{{{True, False}}, {-1 -> False, -3 -> False, 1 -> False}}, 
    {{{Dashing[{170., 100.}], False}}, {-1 -> False, 1 -> False}}}]

enter image description here

share|improve this answer
Really dirty :D –  belisarius May 1 '13 at 22:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.