code: def xlim_change_check(self, idx):
          '''handle xlim change requests from queue'''
          if not self.xlim_pipe[1].poll():
              return
          xlim = self.xlim_pipe[1].recv()
          if xlim is None:
              return
          #print("recv: ", self.graph_num, xlim)
          if self.ax1 is not None and xlim != self.xlim:
              self.xlim = xlim
              self.fig.canvas.toolbar.push_current()
              #print("setting: ", self.graph_num, xlim)
              self.ax1.set_xlim(xlim)
              # trigger the timer, this allows us to setup a v slow animation,
              # which saves a lot of CPU
              self.ani.event_source._on_timer(f xlim_change_check(self, idx):
          '''handle xlim change requests from queue'''
          if not self.xlim_pipe[1].poll():
              return
          xlim = self.xlim_pipe[1].recv()
          if xlim is None:
              return
          #print("recv: ", self.graph_num, xlim)
          if self.ax1 is not None and xlim != self.xlim:
              self.xlim = xlim
              self.fig.canvas.toolbar.push_current()
              #print("setting: ", self.graph_num, xlim)
              self.ax1.set_xlim(xlim)
              # trigger the timer, this allows us to setup a v slow animation,
              # which saves a lot of CPU
              self.ani.event_source._on_timer()
docs: handle xlim change requests from queue