I want to be able to put background color in the spaces between the grid lines of the y axis. Can this be achieved with core plot ? If so, how ?
Any help and/or example code will be much appreciated.
Thank you,
Petar
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
alternatingBandFillsproperty to set the fill between successive major ticks. Here’s an example with two different colors:The array can contain any combinination of
CPTFill,CPTColor,CPTGradient, and/orCPTImageobjects. Blank (transparent) bands can be created by using[NSNull null]in place of some of theCPTFillobjects. You can use as many different fills as you want; the axis will cycle through all of them and then repeat the pattern until all of the spaces are filled.Axes also support what Core Plot calls “limit bands”. This is a way to fill a section within a specific plot range. These don’t automatically repeat like the band fills do.
The Axis Demo in the Plot Gallery example app shows both features.