Core Plot (iOS)
Cocoa plotting framework for Mac OS X and iOS
CPTPlotSpace Class Reference

Defines the coordinate system of a plot. More...

#import <CPTPlotSpace.h>

+ Inheritance diagram for CPTPlotSpace:
+ Collaboration diagram for CPTPlotSpace:

Public Instance Methods

Initialization
(id- init [implementation]
 Initializes a newly allocated CPTPlotSpace object. More...
 
User Interaction
(BOOL- pointingDeviceDownEvent:atPoint: [implementation]
 Informs the receiver that the user has touched the screen. More...
 
(BOOL- pointingDeviceUpEvent:atPoint: [implementation]
 Informs the receiver that the user has lifted their finger off the screen. More...
 
(BOOL- pointingDeviceDraggedEvent:atPoint: [implementation]
 Informs the receiver that the user has moved their finger while touching the screen. More...
 
(BOOL- pointingDeviceCancelledEvent: [implementation]
 Informs the receiver that tracking of touches has been cancelled for any reason. More...
 
Coordinate Space Conversions
(CGPoint- plotAreaViewPointForPlotPoint:
 Converts a data point to plot area drawing coordinates. More...
 
(CGPoint- plotAreaViewPointForPlotPoint:numberOfCoordinates:
 Converts a data point to plot area drawing coordinates. More...
 
(CGPoint- plotAreaViewPointForDoublePrecisionPlotPoint:
 Converts a data point to plot area drawing coordinates. More...
 
(CGPoint- plotAreaViewPointForDoublePrecisionPlotPoint:numberOfCoordinates:
 Converts a data point to plot area drawing coordinates. More...
 
(void) - plotPoint:forPlotAreaViewPoint:
 Converts a point given in plot area drawing coordinates to the data coordinate space. More...
 
(void) - plotPoint:numberOfCoordinates:forPlotAreaViewPoint:
 Converts a point given in plot area drawing coordinates to the data coordinate space. More...
 
(void) - doublePrecisionPlotPoint:forPlotAreaViewPoint:
 Converts a point given in drawing coordinates to the data coordinate space. More...
 
(void) - doublePrecisionPlotPoint:numberOfCoordinates:forPlotAreaViewPoint:
 Converts a point given in drawing coordinates to the data coordinate space. More...
 
(CGPoint- plotAreaViewPointForEvent:
 Converts the interaction point of an OS event to plot area drawing coordinates. More...
 
(void) - plotPoint:forEvent:
 Converts the interaction point of an OS event to the data coordinate space. More...
 
(void) - plotPoint:numberOfCoordinates:forEvent:
 Converts the interaction point of an OS event to the data coordinate space. More...
 
(void) - doublePrecisionPlotPoint:forEvent:
 Converts the interaction point of an OS event to the data coordinate space. More...
 
(void) - doublePrecisionPlotPoint:numberOfCoordinates:forEvent:
 Converts the interaction point of an OS event to the data coordinate space. More...
 
Coordinate Range
(void) - setPlotRange:forCoordinate:
 Sets the range of values for a given coordinate. More...
 
(CPTPlotRange *) - plotRangeForCoordinate:
 Gets the range of values for a given coordinate. More...
 
Scale Types
(void) - setScaleType:forCoordinate:
 Sets the scale type for a given coordinate. More...
 
(CPTScaleType- scaleTypeForCoordinate:
 Gets the scale type for a given coordinate. More...
 
Adjusting Ranges
(void) - scaleToFitPlots:
 Scales the plot ranges so that the plots just fit in the visible space. More...
 
(void) - scaleToFitPlots:forCoordinate:
 Scales the plot range for the given coordinate so that the plots just fit in the visible space. More...
 
(void) - scaleBy:aboutPoint:
 Zooms the plot space equally in each dimension. 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:
 
User Interaction
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

id< NSCopying, NSCoding, NSObjectidentifier
 An object used to identify the plot in collections. More...
 
BOOL allowsUserInteraction
 Determines whether user can interactively change plot range and/or zoom. More...
 
__cpt_weak CPTGraphgraph
 The graph of the space. More...
 
__cpt_weak id
< CPTPlotSpaceDelegate
delegate
 The plot space delegate. More...
 
NSUInteger numberOfCoordinates
 The number of coordinate values that determine a point in the plot space. More...
 

Additional Inherited Members

- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 

Detailed Description

Defines the coordinate system of a plot.

A plot space determines the mapping between data coordinates and device coordinates in the plot area.

Method Documentation

- (void) doublePrecisionPlotPoint: (double *)  plotPoint
forEvent: (CPTNativeEvent *)  event 

Converts the interaction point of an OS event to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as double values).
eventThe event.
Deprecated:
This method will be removed in the 2.0 release. Use -doublePrecisionPlotPoint:numberOfCoordinates:forEvent: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) doublePrecisionPlotPoint: (double *)  plotPoint
forPlotAreaViewPoint: (CGPoint point 

Converts a point given in drawing coordinates to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as double values).
pointThe drawing coordinates of the data point.
Deprecated:
This method will be removed in the 2.0 release. Use -doublePrecisionPlotPoint:numberOfCoordinates:forPlotAreaViewPoint: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) doublePrecisionPlotPoint: (double *)  plotPoint
numberOfCoordinates: (NSUInteger count
forEvent: (CPTNativeEvent *)  event 

Converts the interaction point of an OS event to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as double values).
countThe number of coordinate values in the plotPoint array.
eventThe event.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) doublePrecisionPlotPoint: (double *)  plotPoint
numberOfCoordinates: (NSUInteger count
forPlotAreaViewPoint: (CGPoint point 

Converts a point given in drawing coordinates to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as double values).
countThe number of coordinate values in the plotPoint array.
pointThe drawing coordinates of the data point.

Provided by category CPTPlotSpace(AbstractMethods).

- (id) init
implementation

Initializes a newly allocated CPTPlotSpace object.

The initialized object will have the following properties:

Returns
The initialized object.

Reimplemented in CPTXYPlotSpace.

- (CGPoint) plotAreaViewPointForDoublePrecisionPlotPoint: (double *)  plotPoint

Converts a data point to plot area drawing coordinates.

Parameters
plotPointA c-style array of data point coordinates (as double values).
Returns
The drawing coordinates of the data point.
Deprecated:
This method will be removed in the 2.0 release. Use -plotAreaViewPointForDoublePrecisionPlotPoint:numberOfCoordinates: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (CGPoint) plotAreaViewPointForDoublePrecisionPlotPoint: (double *)  plotPoint
numberOfCoordinates: (NSUInteger count 

Converts a data point to plot area drawing coordinates.

Parameters
plotPointA c-style array of data point coordinates (as double values).
countThe number of coordinate values in the plotPoint array.
Returns
The drawing coordinates of the data point.

Provided by category CPTPlotSpace(AbstractMethods).

- (CGPoint) plotAreaViewPointForEvent: (CPTNativeEvent *)  event

Converts the interaction point of an OS event to plot area drawing coordinates.

Parameters
eventThe event.
Returns
The drawing coordinates of the point.

Provided by category CPTPlotSpace(AbstractMethods).

- (CGPoint) plotAreaViewPointForPlotPoint: (NSDecimal *)  plotPoint

Converts a data point to plot area drawing coordinates.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
Returns
The drawing coordinates of the data point.
Deprecated:
This method will be removed in the 2.0 release. Use -plotAreaViewPointForPlotPoint:numberOfCoordinates: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (CGPoint) plotAreaViewPointForPlotPoint: (NSDecimal *)  plotPoint
numberOfCoordinates: (NSUInteger count 

Converts a data point to plot area drawing coordinates.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
countThe number of coordinate values in the plotPoint array.
Returns
The drawing coordinates of the data point.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) plotPoint: (NSDecimal *)  plotPoint
forEvent: (CPTNativeEvent *)  event 

Converts the interaction point of an OS event to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
eventThe event.
Deprecated:
This method will be removed in the 2.0 release. Use -plotPoint:numberOfCoordinates:forEvent: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) plotPoint: (NSDecimal *)  plotPoint
forPlotAreaViewPoint: (CGPoint point 

Converts a point given in plot area drawing coordinates to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
pointThe drawing coordinates of the data point.
Deprecated:
This method will be removed in the 2.0 release. Use -plotPoint:numberOfCoordinates:forPlotAreaViewPoint: instead.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) plotPoint: (NSDecimal *)  plotPoint
numberOfCoordinates: (NSUInteger count
forEvent: (CPTNativeEvent *)  event 

Converts the interaction point of an OS event to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
countThe number of coordinate values in the plotPoint array.
eventThe event.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) plotPoint: (NSDecimal *)  plotPoint
numberOfCoordinates: (NSUInteger count
forPlotAreaViewPoint: (CGPoint point 

Converts a point given in plot area drawing coordinates to the data coordinate space.

Parameters
plotPointA c-style array of data point coordinates (as NSDecimal structs).
countThe number of coordinate values in the plotPoint array.
pointThe drawing coordinates of the data point.

Provided by category CPTPlotSpace(AbstractMethods).

- (CPTPlotRange *) plotRangeForCoordinate: (CPTCoordinate coordinate

Gets the range of values for a given coordinate.

Parameters
coordinateThe axis coordinate.
Returns
The range of values.

Provided by category CPTPlotSpace(AbstractMethods).

- (BOOL) pointingDeviceCancelledEvent: (CPTNativeEvent *)  event
implementation

Informs the receiver that tracking of touches has been cancelled for any reason.

If the receiver does not have a delegate, this method always returns NO. Otherwise, the -plotSpace:shouldHandlePointingDeviceCancelledEvent: delegate method is called. If it returns NO, this method returns YES to indicate that the event has been handled and no further processing should occur.

Parameters
eventThe OS event.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

- (BOOL) pointingDeviceDownEvent: (CPTNativeEvent *)  event
atPoint: (CGPoint interactionPoint 
implementation

Informs the receiver that the user has touched the screen.

If the receiver does not have a delegate, this method always returns NO. Otherwise, the -plotSpace:shouldHandlePointingDeviceDownEvent:atPoint: delegate method is called. If it returns NO, this method returns YES to indicate that the event has been handled and no further processing should occur.

Parameters
eventThe OS event.
interactionPointThe coordinates of the interaction.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

Reimplemented in CPTXYPlotSpace.

- (BOOL) pointingDeviceDraggedEvent: (CPTNativeEvent *)  event
atPoint: (CGPoint interactionPoint 
implementation

Informs the receiver that the user has moved their finger while touching the screen.

If the receiver does not have a delegate, this method always returns NO. Otherwise, the -plotSpace:shouldHandlePointingDeviceDraggedEvent:atPoint: delegate method is called. If it returns NO, this method returns YES to indicate that the event has been handled and no further processing should occur.

Parameters
eventThe OS event.
interactionPointThe coordinates of the interaction.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

Reimplemented in CPTXYPlotSpace.

- (BOOL) pointingDeviceUpEvent: (CPTNativeEvent *)  event
atPoint: (CGPoint interactionPoint 
implementation

Informs the receiver that the user has lifted their finger off the screen.

If the receiver does not have a delegate , this method always returns NO. Otherwise, the -plotSpace:shouldHandlePointingDeviceUpEvent:atPoint: delegate method is called. If it returns NO, this method returns YES to indicate that the event has been handled and no further processing should occur.

Parameters
eventThe OS event.
interactionPointThe coordinates of the interaction.
Returns
Whether the event was handled or not.

Reimplemented from <CPTResponder>.

Reimplemented in CPTXYPlotSpace.

- (void) scaleBy: (CGFloat interactionScale
aboutPoint: (CGPoint interactionPoint 

Zooms the plot space equally in each dimension.

Parameters
interactionScaleThe scaling factor. One (1) gives no scaling.
interactionPointThe plot area view point about which the scaling occurs.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) scaleToFitPlots: (NSArray *)  plots

Scales the plot ranges so that the plots just fit in the visible space.

Parameters
plotsAn array of the plots that have to fit in the visible area.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) scaleToFitPlots: (NSArray *)  plots
forCoordinate: (CPTCoordinate coordinate 

Scales the plot range for the given coordinate so that the plots just fit in the visible space.

Parameters
plotsAn array of the plots that have to fit in the visible area.
coordinateThe axis coordinate.

Provided by category CPTPlotSpace(AbstractMethods).

- (CPTScaleType) scaleTypeForCoordinate: (CPTCoordinate coordinate

Gets the scale type for a given coordinate.

Parameters
coordinateThe axis coordinate.
Returns
The scale type.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) setPlotRange: (CPTPlotRange *)  newRange
forCoordinate: (CPTCoordinate coordinate 

Sets the range of values for a given coordinate.

Parameters
newRangeThe new plot range.
coordinateThe axis coordinate.

Provided by category CPTPlotSpace(AbstractMethods).

- (void) setScaleType: (CPTScaleType newType
forCoordinate: (CPTCoordinate coordinate 

Sets the scale type for a given coordinate.

Parameters
newTypeThe new scale type.
coordinateThe axis coordinate.

Provided by category CPTPlotSpace(AbstractMethods).

Property Documentation

- (BOOL) allowsUserInteraction
readwritenonatomicassign

Determines whether user can interactively change plot range and/or zoom.

- (__cpt_weak id< CPTPlotSpaceDelegate >) delegate
readwritenonatomicweak

The plot space delegate.

- (__cpt_weak CPTGraph *) graph
readwritenonatomicweak

The graph of the space.

- (id< NSCopying, NSCoding, NSObject >) identifier
readwritenonatomiccopy

An object used to identify the plot in collections.

- (NSUInteger) numberOfCoordinates
readnonatomicassign

The number of coordinate values that determine a point in the plot space.


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