5
$\begingroup$

The first and last rows and columns of my Grids always seem to be smaller than all the other rows in my Grid, as of they had been truncated.

For example

Grid[Array[#1 + #2 &, {5, 5}],ItemSize -> {2, 2},BaseStyle -> {FontFamily -> "Helvetica"},
       Background -> {
          {Green, Automatic, LightRed, Automatic, Green}, 
          {LightBlue, Automatic, Yellow, Automatic, LightBlue}}]

gives

in which all of the elements in the first and last rows are noticeably shorter, and all the elements in the first and last column are noticeably narrower, than all other elements.

Why does this happen and how can I prevent it?

$\endgroup$
6
  • 2
    $\begingroup$ There are no spacings outside so Spacings -> {0, 0} should work. But I agree it's not what one would expect. $\endgroup$
    – Kuba
    Nov 14, 2014 at 22:30
  • $\begingroup$ @Kuba: Wow, not at all what one would expect. $\endgroup$
    – orome
    Nov 14, 2014 at 22:40
  • 1
    $\begingroup$ @Kuba Please define "one" $\endgroup$ Nov 14, 2014 at 22:58
  • $\begingroup$ @belisarius: We two, for a start. $\endgroup$
    – orome
    Nov 14, 2014 at 22:59
  • $\begingroup$ @raxacoricofallapatorius So one == two. You're working modulo zero. $\endgroup$ Nov 14, 2014 at 23:04

1 Answer 1

5
$\begingroup$

There are no spacings outside so Spacings -> {0, 0} should work. [...]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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