Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
|
A datasource class that automatically creates scatter plot data from a function or Objective-C block. More...
#import <CPTFunctionDataSource.h>
Public Class Methods | |
Factory Methods | |
(nonnull instancetype) | + dataSourceForPlot:withFunction: |
Creates and returns a new CPTFunctionDataSource instance initialized with the provided function and plot. More... | |
(nonnull instancetype) | + dataSourceForPlot:withBlock: |
Creates and returns a new CPTFunctionDataSource instance initialized with the provided block and plot. More... | |
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 Instance Methods | |
Initialization | |
(nonnull instancetype) | - initForPlot:withFunction: |
Initializes a newly allocated CPTFunctionDataSource object with the provided function and plot. More... | |
(nonnull instancetype) | - initForPlot:withBlock: |
Initializes a newly allocated CPTFunctionDataSource object with the provided block and plot. 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 <CPTPlotDataSource> | |
(NSUInteger) | - numberOfRecordsForPlot: |
(Required) The number of data points for the plot. More... | |
(nullable NSArray *) | - numbersForPlot:field:recordIndexRange: |
(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More... | |
(nullable id) | - numberForPlot:field:recordIndex: |
(Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. More... | |
(nullable double *) | - doublesForPlot:field:recordIndexRange: |
(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More... | |
(double) | - doubleForPlot:field:recordIndex: |
(Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. More... | |
(nullable CPTNumericData *) | - dataForPlot:field:recordIndexRange: |
(Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More... | |
(nullable CPTNumericData *) | - dataForPlot:recordIndexRange: |
(Optional) Gets a range of plot data for all fields of the given plot simultaneously. Implement one and only one of the optional methods in this section. More... | |
(nullable CPTLayerArray *) | - dataLabelsForPlot:recordIndexRange: |
(Optional) Gets a range of data labels for the given plot. More... | |
(nullable CPTLayer *) | - dataLabelForPlot:recordIndex: |
(Optional) Gets a data label for the given plot. This method will not be called if -dataLabelsForPlot:recordIndexRange: is also implemented in the datasource. More... | |
Properties | |
CPTDataSourceFunction | dataSourceFunction |
The function used to generate plot data. More... | |
CPTDataSourceBlock | dataSourceBlock |
The Objective-C block used to generate plot data. More... | |
CPTPlot * | dataPlot |
The plot that will display the function values. Must be an instance of CPTScatterPlot. More... | |
CGFloat | resolution |
The maximum number of pixels between data points on the plot. Default is 1.0 . More... | |
CPTPlotRange * | dataRange |
The maximum range of x-values that will be plotted. If nil (the default), the function will be plotted for all visible x-values. More... | |
A datasource class that automatically creates scatter plot data from a function or Objective-C block.
+ (nonnull instancetype) dataSourceForPlot: | (nonnull CPTPlot *) | plot | |
withBlock: | (nonnull CPTDataSourceBlock) | block | |
Creates and returns a new CPTFunctionDataSource instance initialized with the provided block and plot.
plot | The plot that will display the function values. |
block | The Objective-C block used to generate plot data. |
+ (nonnull instancetype) dataSourceForPlot: | (nonnull CPTPlot *) | plot | |
withFunction: | (nonnull CPTDataSourceFunction) | function | |
Creates and returns a new CPTFunctionDataSource instance initialized with the provided function and plot.
plot | The plot that will display the function values. |
function | The function used to generate plot data. |
- (nonnull instancetype) initForPlot: | (nonnull CPTPlot *) | plot | |
withBlock: | (nonnull CPTDataSourceBlock) | block | |
Initializes a newly allocated CPTFunctionDataSource object with the provided block and plot.
plot | The plot that will display the function values. |
block | The Objective-C block used to generate plot data. |
- (nonnull instancetype) initForPlot: | (nonnull CPTPlot *) | plot | |
withFunction: | (nonnull CPTDataSourceFunction) | function | |
Initializes a newly allocated CPTFunctionDataSource object with the provided function and plot.
plot | The plot that will display the function values. |
function | The function used to generate plot data. |
|
readnonatomicassign |
The plot that will display the function values. Must be an instance of CPTScatterPlot.
|
readwritenonatomicstrong |
The maximum range of x-values that will be plotted. If nil (the default), the function will be plotted for all visible x-values.
|
readnonatomicassign |
The Objective-C block used to generate plot data.
|
readnonatomicassign |
The function used to generate plot data.
|
readwritenonatomicassign |
The maximum number of pixels between data points on the plot. Default is 1.0
.