code: def resizeEvent(self, event):
          
          value = self.config.value
          self.idx_fig.fitInView(value['x_min'],
                                 value['y_min'],
                                 value['x_max'] - value['x_min'],
                                 value['y_max'] - value['y_min'])
docs: Fit the whole scene in view.
  
          Parameters
          ----------
          event : instance of Qt.Event
              not important