code: def resetCanvasDimensions(self, windowHeight, windowWidth):
          'sets total available canvas dimensions to (windowHeight, windowWidth) (in char cells)'
          self.plotwidth = windowWidth*2
          self.plotheight = (windowHeight-1)*4  # exclude status line
  
          # pixels[y][x] = { attr: list(rows), ... }
          self.pixels = [[defaultdict(list) for x in range(self.plotwidth)] for y in range(self.plotheight)f resetCanvasDimensions(self, windowHeight, windowWidth):
          'sets total available canvas dimensions to (windowHeight, windowWidth) (in char cells)'
          self.plotwidth = windowWidth*2
          self.plotheight = (windowHeight-1)*4  # exclude status line
  
          # pixels[y][x] = { attr: list(rows), ... }
          self.pixels = [[defaultdict(list) for x in range(self.plotwidth)] for y in range(self.plotheight)]
docs: sets total available canvas dimensions to (windowHeight, windowWidth) (in char cells)