0
我正在绘制一个绘图仪应用程序。创建绘图区后,我设法使用-addCurve:index
将图添加到该区域,如下所示。在核心绘图中绘制切线图
-(void)addCurve:(int)index {
// identifier
NSString *identifier = [NSString stringWithFormat:@"plot%d", index];
CPTScatterPlot *boundLinePlot = [[CPTScatterPlot alloc] init];
CPTMutableLineStyle *lineStyle = [CPTMutableLineStyle lineStyle];
lineStyle.miterLimit = 1.0f;
lineStyle.lineWidth = 3.0f;
lineStyle.lineColor = [CPTColor colorWithCGColor:[colorArray[index-1] CGColor]];
boundLinePlot.dataLineStyle = lineStyle;
boundLinePlot.identifier = identifier;
boundLinePlot.dataSource = self;
[graph addPlot:boundLinePlot toPlotSpace:plotSpace];
// interpolatiom
boundLinePlot.interpolation = CPTScatterPlotInterpolationCurved;
}
然而,当我绘制一个正切函数时,最高点和最低点连接并且每两条曲线之间出现垂直线。任何人都知道我能如何摆脱它们?谢谢。
非常感谢你! – user 2015-02-10 10:25:53