zak
zak

Reputation: 39

Points on a CorePlot graph

I'm working on graphics with CorePlot, and I had this graph on my app:

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

Now I need the coordinates to be marked as points, something like this:

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

What do I have to add to have it?

Thank you

Upvotes: 0

Views: 816

Answers (1)

matsr
matsr

Reputation: 4267

You can do something like this..

// 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 could be e.g. a CPTScatterPlot)

From here it should be easy to modify the symbol as you want.

Upvotes: 3

Related Questions