0

Assume I have a very simple file with a matrix like

00011000
00022000
00011000
12100121
12100121
00011000
00022000
00011000

I want to import it to TikZ and transform it to a picture, where each cell in the matrix is interpreted as a small square with a color, defined by the content of the cell (e.g. 0 white, 1 gray, 2 black or so). I think that there is a quite simple solution for it. Probably I do not need a complete solution, some hints should be sufficient. Thanks in advance!

Jürgen
  • 2,160
  • 4
    Related/duplicate: http://tex.stackexchange.com/questions/157080/can-tikz-create-pixel-art-images or http://tex.stackexchange.com/questions/172578/simplest-way-to-create-a-grid-with-colored-squares-and-labels – Steven B. Segletes Oct 08 '16 at 19:22
  • 1
    Yes, 157080 seems to be the right way. I will test it with my 60x80 size matrix. Many thanks for the quick answer. – Jürgen Oct 08 '16 at 19:31

0 Answers0