I want to align the y axis labels of my scatter plot in Core Plot. Currently, the labels are like this:
16
12
8
4
How can I change they alignment to right :
16
12
_8
_4
I tried the following:
y.labelAlignment = CPTAlignmentRight;
It didn't work. How can I do this alignment?
Edit- Here is my code:
CPTAxis *y = axisSet.yAxis;
y.title = @"Y Label";
y.titleTextStyle = axisTitleStyle;
y.titleOffset = -40.0f;
y.axisLineStyle = axisLineStyle;
y.labelingPolicy = CPTAxisLabelingPolicyNone;
y.labelTextStyle = axisTextStyle;
y.labelOffset = 16.0f;
y.majorTickLineStyle = axisLineStyle;
y.majorTickLength = 4.0f;
y.minorTickLength = 2.0f;
y.tickDirection = CPTSignPositive;
y.labelAlignment = CPTAlignmentRight;