1
$\begingroup$

I have the following list:

list = {{114}, {59, 55}, {31, 28, 27}, {17, 14, 14, 13}}

The list data should be placed into a grid this way:

enter image description here

How can I fill and draw such a grid?

$\endgroup$
  • 1
    $\begingroup$ Have you tried anything with Grid/Column and friends? p.s. Visualize Pascal's triangle, 73000 $\endgroup$ – Kuba Mar 20 '17 at 12:52
  • 1
    $\begingroup$ Related: (9959) $\endgroup$ – Mr.Wizard Mar 20 '17 at 13:00
  • 3
    $\begingroup$ You might need to tweak it, this is a start: Column[Grid[{#}, Frame -> All] & /@ list, Alignment -> Center, Spacings -> 0] $\endgroup$ – Jason B. Mar 20 '17 at 13:03
  • 2
    $\begingroup$ Using Spacings -> -0.1 in Jason's code looks even better on my system. $\endgroup$ – Mr.Wizard Mar 20 '17 at 13:06
  • $\begingroup$ @Mr. Wizard and Jason B: Thank you for the solution. $\endgroup$ – lio Mar 20 '17 at 13:16

Your Answer

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

Browse other questions tagged or ask your own question.