Core Plot (iOS and tvOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTMutablePlotRange Class Reference

Defines a mutable range of plot data. More...

#import <CPTMutablePlotRange.h>

+ Inheritance diagram for CPTMutablePlotRange:
+ Collaboration diagram for CPTMutablePlotRange:

Public Instance Methods

Combining Ranges
(void) - unionPlotRange:
 Extends the range to include another range. The sign of length is unchanged. More...
 
(void) - intersectionPlotRange:
 Sets the messaged object to the intersection with another range. The sign of length is unchanged. More...
 
Shifting Ranges
(void) - shiftLocationToFitInRange:
 Moves the whole range so that the location fits in other range. More...
 
(void) - shiftEndToFitInRange:
 Moves the whole range so that the end point fits in other range. More...
 
Expanding/Contracting Ranges
(void) - expandRangeByFactor:
 Extends/contracts the range by a given factor. More...
 
- Public Instance Methods inherited from CPTPlotRange
(nonnull instancetype) - initWithLocation:length:
 Initializes a newly allocated CPTPlotRange object with the provided location and length. More...
 
(nonnull instancetype) - initWithLocationDecimal:lengthDecimal:
 Initializes a newly allocated CPTPlotRange object with the provided location and length. More...
 
(nullable instancetype) - initWithCoder:
 Returns an object initialized from data in a given unarchiver. More...
 
(nonnull instancetype) - init [implementation]
 Initializes a newly allocated CPTPlotRange object. More...
 
(BOOL- contains:
 Determines whether a given number is inside the range. More...
 
(BOOL- containsDouble:
 Determines whether a given number is inside the range. More...
 
(BOOL- containsNumber:
 Determines whether a given number is inside the range. More...
 
(BOOL- isEqualToRange:
 Determines whether a given range is equal to the range of the receiver. More...
 
(BOOL- containsRange:
 Determines whether the receiver entirely contains another range. More...
 
(BOOL- intersectsRange:
 Determines whether a given range intersects the receiver. More...
 
(CPTPlotRangeComparisonResult- compareToNumber:
 Compares a number to the range, determining if it is in the range, or above or below it. More...
 
(CPTPlotRangeComparisonResult- compareToDecimal:
 Compares a number to the range, determining if it is in the range, or above or below it. More...
 
(CPTPlotRangeComparisonResult- compareToDouble:
 Compares a number to the range, determining if it is in the range, or above or below it. More...
 
- Public Instance Methods inherited from NSObject
(Class- classForCoder
 
(id- copy
 
(void) - dealloc
 
(void) - finalize
 
(id- init
 
(id- mutableCopy
 
- Public Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 
- Public Instance Methods inherited from <NSCopying>
(id- copyWithZone:
 
- Public Instance Methods inherited from <NSMutableCopying>
(id- mutableCopyWithZone:
 
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

Range Limits
NSNumberlocation
 The starting value of the range. More...
 
NSNumberlength
 The length of the range. More...
 
NSDecimal locationDecimal
 The starting value of the range. More...
 
NSDecimal lengthDecimal
 The length of the range. More...
 
double locationDouble
 The starting value of the range as a double. More...
 
double lengthDouble
 The length of the range as a double. More...
 
- Properties inherited from CPTPlotRange
NSNumberlocation
 The starting value of the range. More...
 
NSNumberlength
 The length of the range. More...
 
NSNumberend
 The ending value of the range, equivalent to location + length. More...
 
NSDecimal locationDecimal
 The starting value of the range. More...
 
NSDecimal lengthDecimal
 The length of the range. More...
 
NSDecimal endDecimal
 The ending value of the range, equivalent to locationDecimal + lengthDecimal. More...
 
double locationDouble
 The starting value of the range as a double. More...
 
double lengthDouble
 The length of the range as a double. More...
 
double endDouble
 The ending value of the range as a double, equivalent to locationDouble + lengthDouble. More...
 
NSNumberminLimit
 The minimum extreme value of the range. More...
 
NSNumbermidPoint
 The middle value of the range. More...
 
NSNumbermaxLimit
 The maximum extreme value of the range. More...
 
NSDecimal minLimitDecimal
 The minimum extreme value of the range. More...
 
NSDecimal midPointDecimal
 The middle value of the range. More...
 
NSDecimal maxLimitDecimal
 The maximum extreme value of the range. More...
 
double minLimitDouble
 The minimum extreme value of the range as a double. More...
 
double midPointDouble
 The middle value of the range as a double. More...
 
double maxLimitDouble
 The maximum extreme value of the range as a double. More...
 
BOOL isInfinite
 YES if the length of the range is infinite. More...
 
CPTSign lengthSign
 The direction (positive or negative) if the length of the range is infinite. More...
 

Additional Inherited Members

- Public Class Methods inherited from CPTPlotRange
(nonnull instancetype) + plotRangeWithLocation:length:
 Creates and returns a new CPTPlotRange instance initialized with the provided location and length. More...
 
(nonnull instancetype) + plotRangeWithLocationDecimal:lengthDecimal:
 Creates and returns a new CPTPlotRange instance initialized with the provided location and length. More...
 
- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Public Class Methods inherited from <NSSecureCoding>
(BOOL+ supportsSecureCoding:
 

Detailed Description

Defines a mutable range of plot data.

If you need to change the plot range, you should use this class rather than the immutable super class.

Method Documentation

◆ expandRangeByFactor:

- (void) expandRangeByFactor: (nonnull NSNumber *)  factor

Extends/contracts the range by a given factor.

Parameters
factorFactor used. A value of 1.0 gives no change. Less than 1.0 is a contraction, and greater than 1.0 is expansion.

◆ intersectionPlotRange:

- (void) intersectionPlotRange: (nullable CPTPlotRange *)  other

Sets the messaged object to the intersection with another range. The sign of length is unchanged.

Parameters
otherThe other plot range.

◆ shiftEndToFitInRange:

- (void) shiftEndToFitInRange: (nonnull CPTPlotRange *)  otherRange

Moves the whole range so that the end point fits in other range.

Parameters
otherRangeOther range. The minimum possible shift is made. The range length is unchanged.

◆ shiftLocationToFitInRange:

- (void) shiftLocationToFitInRange: (nonnull CPTPlotRange *)  otherRange

Moves the whole range so that the location fits in other range.

Parameters
otherRangeOther range. The minimum possible shift is made. The range length is unchanged.

◆ unionPlotRange:

- (void) unionPlotRange: (nullable CPTPlotRange *)  other

Extends the range to include another range. The sign of length is unchanged.

Parameters
otherThe other plot range.

Property Documentation

◆ length

- (nonnull NSNumber *) length
readwritenonatomicstrong

The length of the range.

See also
lengthDecimal, lengthDouble

◆ lengthDecimal

- (NSDecimal) lengthDecimal
readwritenonatomicassign

The length of the range.

See also
length, lengthDouble

◆ lengthDouble

- (double) lengthDouble
readwritenonatomicassign

The length of the range as a double.

See also
length, lengthDecimal

◆ location

- (nonnull NSNumber *) location
readwritenonatomicstrong

The starting value of the range.

See also
locationDecimal, locationDouble

◆ locationDecimal

- (NSDecimal) locationDecimal
readwritenonatomicassign

The starting value of the range.

See also
location, locationDouble

◆ locationDouble

- (double) locationDouble
readwritenonatomicassign

The starting value of the range as a double.

See also
location, locationDecimal

The documentation for this class was generated from the following files: