Coreplot图表沿y轴填充颜色

use*_*791 1 iphone graph core-plot ios

![在此处输入图像说明] [1]

任何人都可以告诉如何在核心图上从y轴4到10绘制深蓝色遮蔽区域,并通过x轴,如图所示.

Eri*_*och 6

Core Plot称之为"背景限制带".几个示例应用程序中有一些示例,包括Plot Gallery.

CPTPlotRange *range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0)
                                                   length:CPTDecimalFromDouble(6.0)];
CPTFill *bandFill = [CPTFill fillWithColor:[CPTColor blueColor]];
[yAxis addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:range
                                                          fill:bandFill]];
Run Code Online (Sandbox Code Playgroud)