code: def crossPlotAutoRangeMethods(pgImagePlot2d, crossPlot, intialItems=None):
      
      rangeFunctions = OrderedDict({} if intialItems is None else intialItems)
  
      # If crossPlot is "horizontal" or "vertical" make functions that determine the range from the
      # data at the cross hair.
      if crossPlot:
          rangeFunctions['cross all data'] = partial(calcPgImagePlot2dDataRange, pgImagePlot2d,
                                                     0.0, crossPlot)
          for percentage in [0.1, 0.2, 0.5, 1, 2, 5, 10, 20]:
              label = "cross discard {}%".format(percentage)
              rangeFunctions[label] = partial(calcPgImagePlot2dDataRange, pgImagePlot2d,
                                              percentage, crossPlot)
  
      # Always add functions that determine the data from the complete sliced array.
      for percentage in [0.1, 0.2, 0.5, 1, 2, 5, 10, 20]:
          rangeFunctions['image all data'] = partial(calcPgImagePlot2dDataRange, pgImagePlot2d,
                                                     0.0, None)
  
          label = "image discard {}%".format(percentage)
          rangeFunctions[label] = partial(calcPgImagePlot2dDataRange, pgImagePlot2d,
                                          percentage, None)
      return rangeFunctions
docs: Creates an ordered dict with autorange methods for an PgImagePlot2d inspector.
  
          :param pgImagePlot2d: the range methods will work on (the sliced array) of this inspector.
          :param crossPlot: if None, the range will be calculated from the entire sliced array,
              if "horizontal" or "vertical" the range will be calculated from the data under the
              horizontal or vertical cross hairs
          :param intialItems: will be passed on to the  OrderedDict constructor.