Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
CPTFunctionDataSource.h
Go to the documentation of this file.
1 #import "CPTPlot.h"
2 
3 @class CPTPlotRange;
4 
6 
10 typedef double (*CPTDataSourceFunction)(double);
11 
15 typedef double (^CPTDataSourceBlock)(double);
16 
18 
19 @property (nonatomic, readonly, nullable) CPTDataSourceFunction dataSourceFunction;
20 @property (nonatomic, readonly, nullable) CPTDataSourceBlock dataSourceBlock;
21 @property (nonatomic, readonly, nonnull) CPTPlot *dataPlot;
22 
23 @property (nonatomic, readwrite) CGFloat resolution;
24 @property (nonatomic, readwrite, strong, nullable) CPTPlotRange *dataRange;
25 
28 +(nonnull instancetype)dataSourceForPlot:(nonnull CPTPlot *)plot withFunction:(nonnull CPTDataSourceFunction) function NS_SWIFT_NAME(init(for:withFunction:));
29 
30 +(nonnull instancetype)dataSourceForPlot:(nonnull CPTPlot *)plot withBlock:(nonnull CPTDataSourceBlock) block NS_SWIFT_NAME(init(for:withBlock:));
31 
33 
36 -(nonnull instancetype)initForPlot:(nonnull CPTPlot *)plot withFunction:(nonnull CPTDataSourceFunction) function NS_SWIFT_NAME(init(forPlot:withFunction:));
37 
38 -(nonnull instancetype)initForPlot:(nonnull CPTPlot *)plot withBlock:(nonnull CPTDataSourceBlock) block NS_SWIFT_NAME(init(forPlot:withBlock:));
39 
41 
42 @end
CPTFunctionDataSource::dataPlot
CPTPlot * dataPlot
The plot that will display the function values. Must be an instance of CPTScatterPlot.
Definition: CPTFunctionDataSource.h:21
NSObject
CPTFunctionDataSource::resolution
CGFloat resolution
The maximum number of pixels between data points on the plot. Default is 1.0.
Definition: CPTFunctionDataSource.h:23
CPTPlotDataSource-p
A plot data source.
Definition: CPTPlot.h:51
-[NSObject init]
id init
CPTPlotRange
Defines an immutable range of plot data.
Definition: CPTPlotRange.h:27
CPTFunctionDataSource::dataSourceBlock
CPTDataSourceBlock dataSourceBlock
The Objective-C block used to generate plot data.
Definition: CPTFunctionDataSource.h:20
CPTPlot.h
CPTDataSourceFunction
double(* CPTDataSourceFunction)(double)
A function called to generate plot data in a CPTFunctionDataSource datasource.
Definition: CPTFunctionDataSource.h:10
CPTFunctionDataSource
A datasource class that automatically creates scatter plot data from a function or Objective-C block.
Definition: CPTFunctionDataSource.h:17
CPTPlot
An abstract plot class.
Definition: CPTPlot.h:258
CPTDataSourceBlock
double(^ CPTDataSourceBlock)(double)
An Objective-C block called to generate plot data in a CPTFunctionDataSource datasource.
Definition: CPTFunctionDataSource.h:15
CPTFunctionDataSource::dataSourceFunction
CPTDataSourceFunction dataSourceFunction
The function used to generate plot data.
Definition: CPTFunctionDataSource.h:19
CPTFunctionDataSource::dataRange
CPTPlotRange * dataRange
The maximum range of x-values that will be plotted. If nil (the default), the function will be plotte...
Definition: CPTFunctionDataSource.h:24