0

I am using coreplot to draw a graph, and I am using backgroundLimitBands in order to color certain ranges to indicate various levels of danger (in this case, temperatures). However, I would like to cut the limit bands off at a certain x-value (where the data ends) while the gridlines and tickmarks continue to the end of the range.

One way that I figured would be possible would be to simply add an X-axis limit band starting at the point I want to mask off the other bands. That way I could set the correct color and it would appear as if the limit bands were masked on the x axis.

Unfortunately, it appears that the y-axis limit bands are always drawn after the x axis, and I cannot find a way to fix this. Is there some way to change the rendering order? Additionally, is there a better way to limit the x-axis length of a y-axis limit band?

4

1 回答 1

0

For those who might be interested--the limit bands are rendered according to the order of the axis for which they are added in the axisSet.axes array. So all that is needed to switch the order of the axis is to re-order the axisSet.axes array by doing something like:

[axisSet setAxes:@[[axisSet.axes objectAtIndex:1],[axisSet.axes objectAtIndex:0]]];

given that I only have an x and a y axis.

于 2013-07-01T22:38:04.867 回答