我正在使用CorePlot处理图形,我的应用程序上有这个图形:
The graphic I have http://data.imagup.com/10/1159174088.3134png
现在我需要将坐标标记为点,如下所示:
The graphic I want http://data.imagup.com/12/1159172987.1122png
我必须添加什么才能拥有它?
谢谢
答案 0 :(得分:3)
你可以这样做......
// Add the plot symbol.
CPTPlotSymbol *plotSymbol = [CPTPlotSymbol ellipsePlotSymbol]; // Ellipse is used for circles
plotSymbol.fill = [CPTFill fillWithColor:[CPTColor blueColor]];
plotSymbol.size = CGSizeMake(5.0, 5.0);
// Set the line style of the edges of your symbol. (Around your symbol)
CPTMutableLineStyle *plotSymbolLineStyle = [[[CPTMutableLineStyle alloc] init] autorelease];
plotSymbolLineStyle.lineColor = [CPTColor blackColor];
plotSymbolLineStyle.lineWidth = 1.0f;
plotSymbol.lineStyle = plotSymbolLineStyle;
plot.plotSymbol = plotSymbol;
(plot
可以是例如CPTScatterPlot
)
从这里可以很容易地根据需要修改符号。