title: Pygame offset a grid made out of rectangles
body: <p>I have this grid that I draw using <code>pygame</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/twlXp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/twlXp.png" alt="Grid"></a>
  As you can see, it starts off at the top left corner. I draw it like this:</p>
  
  <pre><code>import pygame
  
  # Color vars here
  
  # Grid vars
  WIDTH = 4
  HEIGHT = 4
  MARGIN = 1
  
  # Initialize pygame
  pygame.init()
  WINDOW_SIZE = [820, 620]
  screen = pygame.display.set_mode(WINDOW_SIZE)
  
  # Loop until the user clicks the close button.
  done = False
  
  # Used to manage how fast the screen updates
  clock = pygame.time.Clock()
  
  # -------- Main Program Loop -----------
  while not done:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              done = True
  
      # Set the screen background
      screen.fill(BLACK)
  
      # Draw the grid
      for row in range(120):
          for column in range(160):
              # Set the color here
  
              # Draw rectangle
              pygame.draw.rect(screen, color, [
                  (MARGIN + WIDTH) * column + MARGIN,
                  (MARGIN + HEIGHT) * row + MARGIN, WIDTH, HEIGHT])
  
      # Limit to 60 frames per second
      clock.tick(60)
  
      # Update the screen
      pygame.display.flip()
  
  # Prevent hang if idle
  pygame.quit()
  </code></pre>
  
  <p>How can I offset the grid so it doesn't start off at the top left? I want to move it right and down a bit. Any help would be appreciated.</p>