What algorithm or formula would you recommend to set the labels on the y-axis to multiples of 5 or 10 in CorePlot?
I basically want to get even numbering, for instance: 5, 10, 15, 20 or 100, 105, 110, 115… and set the maximum number of y-labels to 10.
Any ideas would be welcome! Thank you!!
This is controlled by the “labeling policy”. You have several choices:
If you know how far apart you want the tick marks, keep the default labeling policy (fixed interval) and set the
majorIntervalLengthto the desired interval. You could also use the automatic policy to let Core Plot pick the intervals. Use thepreferredNumberOfMajorTicksproperty to give it a hint about how many tick marks to make.