0
votes

I saw this question here: Coreplot graph fill color along y-axis

It answers how to fill the plot along the xaxis:

CPTPlotRange *range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0) length:CPTDecimalFromDouble(6.0)];
CPTFill *bandFill = [CPTFill fillWithColor:[[CPTColor whiteColor] colorWithAlphaComponent:.2f]];
[xAxis addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:range
                                                          fill:bandFill]];

However, that gives me a graph like this:

I'd like the white color to only be under the graph line, not above it.

Is there a way to do that?

1
Do you want the fill under the whole plot or just a segment like the limit band? - Eric Skroch
I'd like an under-the-plot limit band. - BigCheesy

1 Answers

1
votes

You could break the plot into pieces and use different plots for each segment. Apply an areaFill to the segment you want highlighted.

You can also add an enhancement request on the Core Plot issue tracker to have this added natively to the scatter plot.