Coreplot graph fill color along y-axis

前端 未结 1 914
暗喜
暗喜 2021-01-15 22:33

![enter image description here][1]

Can anybody tell how to draw dark blue masked area on coreplot graph from y-axis 4 to 10 and through out the x-axis like i showed

相关标签:
1条回答
  • 2021-01-15 23:18

    Core Plot calls that a "background limit band". There are examples in several of the example apps, including the 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]];
    
    0 讨论(0)
提交回复
热议问题