title: Automated cross stich pattern
body: <p>I'm trying to create a cross stitch pattern with python as shown in the attached image. </p>
  
  <p>So far I simply have the pixilated image. I could import it in excel and  manually add the grid and colors etc. But how can I 'easily' automate this in python? Can I use any of the normal figure plotting functions (pyplot), or should I look into tkinter?</p>
  
  <p>I'm fairly ok making scripts in python for engineering purposes, but completely new to GUI-stuff.</p>
  
  <p>Ideally my output would be a vectored pdf</p>
  
  <p><a href="https://i.stack.imgur.com/8ts6M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ts6M.png" alt="Cross stitch pattern"></a></p>
  
  <pre><code>from scipy import misc
  import matplotlib.pyplot as plt
  import numpy as np
  import matplotlib.ticker as plticker
  
  arr = misc.imread('Fox_drawing_pixelized.png', mode= 'RGBA') # 640x480x3 array
  
  fig = plt.figure()
  imgplot = plt.imshow(arr) # RGBA
  ax = plt.gca()
  ax.grid(True)
  ax.grid(b=True, which='major', color='b', linestyle='-')
  plt.minorticks_on()
  loc = plticker.MultipleLocator(base=1)
  ax.xaxis.set_minor_locator(loc)
  ax.yaxis.set_minor_locator(loc)
  ax.grid(b=True, which='minor', color='k', linestyle='-',linewidth=.3)
  fig.savefig("foo.pdf", bbox_inches='tight')
  </code></pre>
  
  <ul>
  <li><p>How do I set the gridlines at 0.5 rather than on the units (in the middle through each pixel)?</p></li>
  <li><p>How do I plot text throught each pixel, I already have the image in an array with numbers how to plot this on top?</p></li>
  </ul>