0

我正在使用 CPTScatterPlot 在 iPad 中显示图形。代码运行正常,但点未绘制在图表上。甚至没有显示一个点。为什么会这样???

我的代码是:

CPTScatterPlot *dataSourceLinePlot = [[[CPTScatterPlot alloc] init] autorelease];
dataSourceLinePlot.identifier = @"Red Plot";

CPTMutableLineStyle *symbolLineStyle2 = [CPTLineStyle lineStyle];
symbolLineStyle2.lineColor = [CPTColor redColor];
symbolLineStyle2.lineWidth = 5.0;
//symbolLineStyle2.miterLimit = 1.0f;
dataSourceLinePlot.dataLineStyle = symbolLineStyle2;
dataSourceLinePlot.dataSource = self;
[graph addPlot:dataSourceLinePlot];


// Animate in the new plot, as an example
dataSourceLinePlot.opacity = 0.0f;
[graph addPlot:dataSourceLinePlot];

我检查了两种委托方法。两者都返回正确的值,但未绘制图表可能是什么原因。请帮忙...

4

1 回答 1

1

删除这一行:

dataSourceLinePlot.opacity = 0.0f;
于 2012-02-23T17:22:16.137 回答