RandomGuy
RandomGuy

Reputation: 127

Is it possible to fill a certain part of Graph in a color different from the rest using core plot?

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

Answers (1)

iDev
iDev

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

Related Questions