Reputation: 127
I have created a scatter plot and filled its area with some color. Now I want only a particular portion of the Area Graph to be filled by a different color. How can I achieve it using core plot?
Upvotes: 0
Views: 718
Reputation: 23278
Have you checked this question. Coreplot graph fill color along y-axis. This should lead you to the right direction. The following is the answer by Eric in that post.
CPTPlotRange *range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0)
length:CPTDecimalFromDouble(6.0)];
CPTFill *bandFill = [CPTFill fillWithColor:[CPTColor blueColor]];
[yAxis addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:range
fill:bandFill]];
Upvotes: 1