Skip to content

Instantly share code, notes, and snippets.

@narcelio
Created February 5, 2017 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save narcelio/8c406c69e5c7ea14aa304b5699df87a5 to your computer and use it in GitHub Desktop.
Save narcelio/8c406c69e5c7ea14aa304b5699df87a5 to your computer and use it in GitHub Desktop.
from matplotlib import pyplot
from matplotlib import cm
import numpy
data = '010101010101010101011110111010101100001001101110110011000010001101110010011100001001100011000101110111100000010100101111001111011110001000101000010001110110111111001100101100101000011000011110110011000111001000101110001100100101010011010011011011110000011111111000010011001001111111101100000101011100011111000000000000000000'
data = list(data)
pyplot.imsave('datamatrix.png', numpy.array(data).reshape(18,18), cmap=cm.gray)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment