Coreplot图形沿y轴填充颜色 [英] Coreplot graph fill color along y-axis
本文介绍了Coreplot图形沿y轴填充颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CPTPlotRange * range = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(4.0 )
length:CPTDecimalFromDouble(6.0)];
CPTFill * bandFill = [CPTFill fillWithColor:[CPTColor blueColor]];
[yAxis addBackgroundLimitBand:[CPTLimitBand limitBandWithRange:range
fill:bandFill]];
![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 in the figure.
解决方案
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]];
这篇关于Coreplot图形沿y轴填充颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文