Coreplot图形沿y轴填充颜色 [英] Coreplot graph fill color along y-axis

查看:121
本文介绍了Coreplot图形沿y轴填充颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉如何在coreplot图上从y轴4到10绘制深蓝色的蒙面区域,并通过像我在图中显示的那样从X轴出来。 核心图称为背景限制带。有几个示例应用程序中的示例,包括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]];


![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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆