code: def check_minmax(plotman, cid, xmin, xmax, zmin, zmax, vmin, vmax):
      '''Get min and max values for axes and colorbar if not given
      '''
      if xmin is None:
          xmin = plotman.grid.grid['x'].min()
      if xmax is None:
          xmax = plotman.grid.grid['x'].max()
      if zmin is None:
          zmin = plotman.grid.grid['z'].min()
      if zmax is None:
          zmax = plotman.grid.grid['z'].max()
      if isinstance(cid, int):
              subdata = plotman.parman.parsets[cid]
      else:
              subdata = cid
      if vmin is None:
          vmin = subdata.min()
      if vmax is None:
          vmax = subdata.max()
  
      return xmin, xmax, zmin, zmax, vmin, vmaf check_minmax(plotman, cid, xmin, xmax, zmin, zmax, vmin, vmax):
      '''Get min and max values for axes and colorbar if not given
      '''
      if xmin is None:
          xmin = plotman.grid.grid['x'].min()
      if xmax is None:
          xmax = plotman.grid.grid['x'].max()
      if zmin is None:
          zmin = plotman.grid.grid['z'].min()
      if zmax is None:
          zmax = plotman.grid.grid['z'].max()
      if isinstance(cid, int):
              subdata = plotman.parman.parsets[cid]
      else:
              subdata = cid
      if vmin is None:
          vmin = subdata.min()
      if vmax is None:
          vmax = subdata.max()
  
      return xmin, xmax, zmin, zmax, vmin, vmax
docs: Get min and max values for axes and colorbar if not given