code: def checkReszie(self):
          '''Checks if the window was resized.'''
          if not self.resized:
              oldypx = self.ypx
              oldxpx = self.xpx
              self.ypx = self.figure.get_size_inches()[1]*self.figure.dpi
              self.xpx = self.figure.get_size_inches()[0]*self.figure.dpi
              if (oldypx != self.ypx) or (oldxpx != self.xpx):
                  self.resized = True
              else:
                  self.resized = Falsf checkReszie(self):
          '''Checks if the window was resized.'''
          if not self.resized:
              oldypx = self.ypx
              oldxpx = self.xpx
              self.ypx = self.figure.get_size_inches()[1]*self.figure.dpi
              self.xpx = self.figure.get_size_inches()[0]*self.figure.dpi
              if (oldypx != self.ypx) or (oldxpx != self.xpx):
                  self.resized = True
              else:
                  self.resized = False
docs: Checks if the window was resized.