Question

I am using CorePlot to plot a scatter plot on iPhone. With the help of the following code, I am able to only plot all circles with a specific radius.

CPTPlotSymbol *greenCirclePlotSymbol = [CPTPlotSymbol ellipsePlotSymbol];

greenCirclePlotSymbol.fill = [CPTFill fillWithColor:[CPTColor greenColor]];

greenCirclePlotSymbol.size = CGSizeMake(2.0, 2.0);

I aim to plot circles with different radius.

Each circle of the scatter plot should have a different radius depending on the number of occurrences of the value.

Can anyone help me with this.

Thanks.

Était-ce utile?

La solution

Implement the -symbolForScatterPlot:recordIndex: datasource method. For each data index, create a new symbol with the correct size and return it.

Look at the plot symbol test in the Mac CPTTestApp example app for working sample code.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top