def reconcileLimits(self):
        """If self.minValue is not less than self.maxValue, fix the problem.

        If self.minValue is not less than self.maxValue, adjust
        self.minValue and/or self.maxValue (depending on which was not
        specified explicitly by the user) to make self.minValue <
        self.maxValue. If the user specified both limits explicitly, then
        raise GraphError.
        """
        if self.minValue < self.maxValue:
            # The limits are already OK.
            return

        minFixed = (self.minValueSource in ['min'])
        maxFixed = (self.maxValueSource in ['max', 'limit'])

        if minFixed and maxFixed:
            raise GraphError('The %s must be less than the %s' %
                             (self.minValueSource, self.maxValueSource))
        elif minFixed:
            self.maxValue = self.minValue + self.chooseDelta(self.minValue)
        elif maxFixed:
            self.minValue = self.maxValue - self.chooseDelta(self.maxValue)
        else:
            delta = self.chooseDelta(max(abs(self.minValue),
                                         abs(self.maxValue)))
            average = (self.minValue + self.maxValue) / 2.0
            self.minValue = average - delta
            self.maxValue = average + delta
def reconcileLimits ( self ) : if self . minValue < self . maxValue : return minFixed = ( self . minValueSource in [ 'min' ] ) maxFixed = ( self . maxValueSource in [ 'max' , 'limit' ] ) if minFixed and maxFixed : raise GraphError ( 'The %s must be less than the %s' % ( self . minValueSource , self . maxValueSource ) ) elif minFixed : self . maxValue = self . minValue + self . chooseDelta ( self . minValue ) elif maxFixed : self . minValue = self . maxValue - self . chooseDelta ( self . maxValue ) else : delta = self . chooseDelta ( max ( abs ( self . minValue ) , abs ( self . maxValue ) ) ) average = ( self . minValue + self . maxValue ) / 2.0 self . minValue = average - delta self . maxValue = average + delta
If self.minValue is not less than self.maxValue, fix the problem.

        If self.minValue is not less than self.maxValue, adjust
        self.minValue and/or self.maxValue (depending on which was not
        specified explicitly by the user) to make self.minValue <
        self.maxValue. If the user specified both limits explicitly, then
        raise GraphError.