title: Best way to plot a 2D square lattice of atoms in Python?
body: <p>Summary of the problem:
  I'm working on a Physics problem and I want to plot a 2D lattice of atoms, where the nodes have been connected using arrows as shown here <a href="https://i.stack.imgur.com/6YK8M.png" rel="nofollow noreferrer">2D lattice figure</a>.</p>
  
  <p>What I've tried:
  I've tried using <a href="https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.generators.classic.grid_2d_graph.html#networkx.generators.classic.grid_2d_graph" rel="nofollow noreferrer">grid_2d_graph</a> from NetworkX, taking help from this <a href="https://stackoverflow.com/questions/33168699/remove-rotation-effect-when-drawing-a-square-grid-of-mxm-nodes-in-networkx-using">answer</a> but wasn't able to get it to work as I wanted it to.  The code I used was as follows:</p>
  
  <pre><code>G = nx.grid_2d_graph(4,4)
  pos = dict( (n, n) for n in G.nodes() )
  nx.draw_networkx(G, pos=pos)
  plt.axis('off')
  plt.show()
  </code></pre>
  
  <p>This produced the following <a href="https://i.stack.imgur.com/Z8fsJ.png" rel="nofollow noreferrer">image</a>, which wasn't exactly what I had in mind.</p>