code: def set_xlim_cb(self, redraw=True):
          
          try:
              xmin = float(self.w.x_lo.get_text())
          except Exception:
              set_min = True
          else:
              set_min = False
  
          try:
              xmax = float(self.w.x_hi.get_text())
          except Exception:
              set_max = True
          else:
              set_max = False
  
          if set_min or set_max:
              self.tab_plot.draw()
              self.set_xlimits_widgets(set_min=set_min, set_max=set_max)
  
          if not (set_min and set_max):
              self.tab_plot.ax.set_xlim(xmin, xmax)
              if redraw:
                  self.tab_plot.draw()
docs: Set plot limit based on user values.