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

Positions a content layer relative to some anchor point in a plot space. More...

#import <CPTPlotSpaceAnnotation.h>

+ Inheritance diagram for CPTPlotSpaceAnnotation:
+ Collaboration diagram for CPTPlotSpaceAnnotation:

Public Instance Methods

Initialization
(nonnull instancetype) - initWithPlotSpace:anchorPlotPoint:
 Initializes a newly allocated CPTPlotSpaceAnnotation object. More...
 
(nullable instancetype) - initWithCoder:
 Returns an object initialized from data in a given unarchiver. More...
 
- Public Instance Methods inherited from CPTAnnotation
(nonnull instancetype) - init
 Initializes a newly allocated CPTAnnotation object. More...
 
(void) - positionContentLayer
 Positions the content layer relative to its reference anchor. 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 <NSKeyValueBindingCreation>
(NSArray *) - exposedBindings
 
(Class- valueClassForBinding:
 
(void) - bind:toObject:withKeyPath:options:
 
(NSArray *) - optionDescriptionsForBinding:
 
(NSDictionary *) - infoForBinding:
 
(void) - unbind:
 
- Public Instance Methods inherited from <NSCoding>
(id- initWithCoder:
 
(void) - encodeWithCoder:
 

Properties

CPTNumberArrayanchorPlotPoint
 An array of NSDecimalNumber objects giving the anchor plot coordinates. More...
 
CPTPlotSpaceplotSpace
 The plot space which the anchor is defined in. More...
 
- Properties inherited from CPTAnnotation
CPTLayercontentLayer
 The annotation content. More...
 
CPTAnnotationHostLayerannotationHostLayer
 The host layer for the annotation content. More...
 
CGPoint contentAnchorPoint
 The anchor point for the content layer. More...
 
CGPoint displacement
 The displacement from the layer anchor point. More...
 
CGFloat rotation
 The rotation of the label in radians. More...
 

Additional Inherited Members

- Public Class Methods inherited from NSObject
(id+ alloc
 
(Class+ class
 
(void) + initialize
 
(void) + load
 
(id+ new
 
- Public Class Methods inherited from <NSKeyValueBindingCreation>
(void) + exposeBinding:
 
- Public Class Methods inherited from <NSSecureCoding>
(BOOL+ supportsSecureCoding:
 

Detailed Description

Positions a content layer relative to some anchor point in a plot space.

Plot space annotations are positioned relative to a plot space. This allows the annotation content layer to move with the plot when the plot space changes. This is useful for applications such as labels attached to specific data points on a plot.

Method Documentation

◆ initWithCoder:

- (nullable instancetype) initWithCoder: (nonnull NSCoder *)  coder

Returns an object initialized from data in a given unarchiver.

Parameters
coderAn unarchiver object.
Returns
An object initialized from data in a given unarchiver.

Reimplemented from CPTAnnotation.

◆ initWithPlotSpace:anchorPlotPoint:

- (nonnull instancetype) initWithPlotSpace: (nonnull CPTPlotSpace *)  newPlotSpace
anchorPlotPoint: (nullable CPTNumberArray *)  newPlotPoint 

Initializes a newly allocated CPTPlotSpaceAnnotation object.

This is the designated initializer. The initialized layer will be anchored to a point in plot coordinates.

Parameters
newPlotSpaceThe plot space which the anchor is defined in. Must be non-nil.
newPlotPointAn array of NSDecimalNumber objects giving the anchor plot coordinates.
Returns
The initialized CPTPlotSpaceAnnotation object.

Property Documentation

◆ anchorPlotPoint

- (nullable CPTNumberArray *) anchorPlotPoint
readwritenonatomiccopy

An array of NSDecimalNumber objects giving the anchor plot coordinates.

◆ plotSpace

- (nonnull CPTPlotSpace *) plotSpace
readnonatomicassign

The plot space which the anchor is defined in.


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