0

As seen on the picture below the x-axis is very crowded in this example. I do know that the scale can be changed in Core-Plotr via:

axisSet.xAxis.majorIntervalLength = CPTDecimalFromFloat(1.0f);

...so it will make it easier to read.

My question is if there is a way to automate the scaling of the axis so when it get too crowdy the axis label change to continue to be readable?

I guess that one way is to check the number of data points and change via code but it would be convenient if it is available via Core-Plot.

Here is a picture that shows my test graph:

enter image description here

When is get at this stage i would like to change it so it shows every 5th number and then every 10th etc.

1 Answer 1

1

Try the CPTAxisLabelingPolicyAutomatic labeling policy. There's a demo in the Plot Gallery example app that shows all of the available labeling policies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.