title: How can I plot an NxN grid with Python?
body: <p>Hi everybody I am trying to do something easy in Python but for me, nothing seems to be easy. What I want to do is to plot a grid of nxn automatically that is when I change the numbers in (make) for instance (4,4) to plot a 4X4 grid if I write (10,10) to plot a 10X10 grid, and so on. My code is below. Any help, please</p>
  <pre><code>import matplotlib.pyplot as plt
  
  import numpy as np
  
  def make(X,Y):
  
      x, y = np.indices((X,Y))
  
  
      sqr = (x==0) &amp; (y==0)
  
  
      for i in range (X):
           for j in range (Y):
           
                sqr = (x==i) &amp; (y==j) 
            
            
      plt.show()
      plt(sqr)
  
  make(10,10)
  </code></pre>