1
$\begingroup$

I have a grid whose number of rows is a multiple of 3, for example

Grid[{{a, a},{a, a},{a, a},{a, a},{a, a},{a, a}}]

Is there an automatic way using the option spacings, so that at every third row the spacing is increased? I tried

Grid[{{a, a},{a, a},{a, a},{a, a},{a, a},{a, a}},Spacings -> {0, {0, 0, 3}}]

but this only inserts a spacing of 3 in the third row without repeating the pattern.

$\endgroup$
3
$\begingroup$

You need an additional list wrapper:

Grid[{{a, a}, {a, a}, {a, a}, {a, a}, {a, a}, {a, a}}, 
 Spacings -> {0, {{0, 0, 3}}}]

enter image description here

$\endgroup$
  • $\begingroup$ That does the trick, thank you! $\endgroup$ – oscurecer Apr 20 '18 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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