CorePlot图上的点

时间:2012-08-09 10:38:02

标签: objective-c ios ipad graphics core-plot

我正在使用CorePlot处理图形,我的应用程序上有这个图形:

The graphic I have http://data.imagup.com/10/1159174088.3134png

现在我需要将坐标标记为点,如下所示:

The graphic I want http://data.imagup.com/12/1159172987.1122png

我必须添加什么才能拥有它?

谢谢

1 个答案:

答案 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

从这里可以很容易地根据需要修改符号。