source: orbit/iOS/Orbit/Orbit/CorePlotHeaders/CPTScatterPlot.h @ a9059a5

RawEEGRaw_EEG_PlotServoTab_Interfacepyramid
Last change on this file since a9059a5 was a9059a5, checked in by Steve Castellotti <sc@…>, 9 years ago

Arduino:

  • updated to permit custom setting of Throttle, Yaw, and Pitch

Android:

  • Minor tweak to Configuration location

iOS:

  • Property mode set to 100644
File size: 4.3 KB
Line 
1#import "CPTDefinitions.h"
2#import "CPTPlot.h"
3#import <Foundation/Foundation.h>
4
5/// @file
6
7@class CPTLineStyle;
8@class CPTMutableNumericData;
9@class CPTNumericData;
10@class CPTPlotSymbol;
11@class CPTScatterPlot;
12@class CPTFill;
13
14/// @ingroup plotBindingsScatterPlot
15/// @{
16extern NSString *const CPTScatterPlotBindingXValues;
17extern NSString *const CPTScatterPlotBindingYValues;
18extern NSString *const CPTScatterPlotBindingPlotSymbols;
19/// @}
20
21/**
22 *  @brief Enumeration of scatter plot data source field types
23 **/
24typedef enum _CPTScatterPlotField {
25    CPTScatterPlotFieldX, ///< X values.
26    CPTScatterPlotFieldY  ///< Y values.
27}
28CPTScatterPlotField;
29
30/**
31 *  @brief Enumeration of scatter plot interpolation algorithms
32 **/
33typedef enum _CPTScatterPlotInterpolation {
34    CPTScatterPlotInterpolationLinear,    ///< Linear interpolation.
35    CPTScatterPlotInterpolationStepped,   ///< Steps beginnning at data point.
36    CPTScatterPlotInterpolationHistogram, ///< Steps centered at data point.
37    CPTScatterPlotInterpolationCurved     ///< Bezier curve interpolation.
38}
39CPTScatterPlotInterpolation;
40
41#pragma mark -
42
43/**
44 *  @brief A scatter plot data source.
45 **/
46@protocol CPTScatterPlotDataSource<CPTPlotDataSource>
47
48@optional
49
50/// @name Plot Symbols
51/// @{
52
53/** @brief @optional Gets a range of plot symbols for the given scatter plot.
54 *  @param plot The scatter plot.
55 *  @param indexRange The range of the data indexes of interest.
56 *  @return An array of plot symbols.
57 **/
58-(NSArray *)symbolsForScatterPlot:(CPTScatterPlot *)plot recordIndexRange:(NSRange)indexRange;
59
60/** @brief @optional Gets a single plot symbol for the given scatter plot.
61 *  This method will not be called if
62 *  @link CPTScatterPlotDataSource::symbolsForScatterPlot:recordIndexRange: -symbolsForScatterPlot:recordIndexRange: @endlink
63 *  is also implemented in the datasource.
64 *  @param plot The scatter plot.
65 *  @param idx The data index of interest.
66 *  @return The plot symbol to show for the point with the given index.
67 **/
68-(CPTPlotSymbol *)symbolForScatterPlot:(CPTScatterPlot *)plot recordIndex:(NSUInteger)idx;
69
70/// @}
71
72@end
73
74#pragma mark -
75
76/**
77 *  @brief Scatter plot delegate.
78 **/
79@protocol CPTScatterPlotDelegate<CPTPlotDelegate>
80
81@optional
82
83/// @name Point Selection
84/// @{
85
86/** @brief @optional Informs the delegate that a data point was
87 *  @if MacOnly clicked. @endif
88 *  @if iOSOnly touched. @endif
89 *  @param plot The scatter plot.
90 *  @param idx The index of the
91 *  @if MacOnly clicked data point. @endif
92 *  @if iOSOnly touched data point. @endif
93 **/
94-(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)idx;
95
96/** @brief @optional Informs the delegate that a data point was
97 *  @if MacOnly clicked. @endif
98 *  @if iOSOnly touched. @endif
99 *  @param plot The scatter plot.
100 *  @param idx The index of the
101 *  @if MacOnly clicked data point. @endif
102 *  @if iOSOnly touched data point. @endif
103 *  @param event The event that triggered the selection.
104 **/
105-(void)scatterPlot:(CPTScatterPlot *)plot plotSymbolWasSelectedAtRecordIndex:(NSUInteger)idx withEvent:(CPTNativeEvent *)event;
106
107/// @}
108
109@end
110
111#pragma mark -
112
113@interface CPTScatterPlot : CPTPlot {
114    @private
115    CPTScatterPlotInterpolation interpolation;
116    CPTLineStyle *dataLineStyle;
117    CPTPlotSymbol *plotSymbol;
118    CPTFill *areaFill;
119    CPTFill *areaFill2;
120    NSDecimal areaBaseValue;
121    NSDecimal areaBaseValue2;
122    CGFloat plotSymbolMarginForHitDetection;
123}
124
125/// @name Appearance
126/// @{
127@property (nonatomic, readwrite) NSDecimal areaBaseValue;
128@property (nonatomic, readwrite) NSDecimal areaBaseValue2;
129@property (nonatomic, readwrite, assign) CPTScatterPlotInterpolation interpolation;
130/// @}
131
132/// @name Drawing
133/// @{
134@property (nonatomic, readwrite, copy) CPTLineStyle *dataLineStyle;
135@property (nonatomic, readwrite, copy) CPTPlotSymbol *plotSymbol;
136@property (nonatomic, readwrite, copy) CPTFill *areaFill;
137@property (nonatomic, readwrite, copy) CPTFill *areaFill2;
138/// @}
139
140/// @name User Interaction
141/// @{
142@property (nonatomic, readwrite, assign) CGFloat plotSymbolMarginForHitDetection;
143/// @}
144
145/// @name Visible Points
146/// @{
147-(NSUInteger)indexOfVisiblePointClosestToPlotAreaPoint:(CGPoint)viewPoint;
148-(CGPoint)plotAreaPointOfVisiblePointAtIndex:(NSUInteger)idx;
149/// @}
150
151/// @name Plot Symbols
152/// @{
153-(CPTPlotSymbol *)plotSymbolForRecordIndex:(NSUInteger)idx;
154/// @}
155
156@end
Note: See TracBrowser for help on using the repository browser.