There are a couple of ways to make axis labels that are not numeric representations of the data value.
If you are plotting categorical data, you can set the scale type of the plot space to show categorical labels and return the text of the label from the datasource for the plot value (e.g., the bar location for a bar plot).
From the "Vertical Bar Chart" demo in the Plot Gallery example app:
// setup
[barPlotSpace setScaleType:CPTScaleTypeCategory forCoordinate:CPTCoordinateX];
If you're not plotting categorical data or you just need more control over the labels, you can create custom axis labels. Set the axis labelingPolicy
to CPTAxisLabelingPolicyNone
, create a set of axis labels, and assign it to the axisLabels
property. There are several demos in the example apps including the "Composite Plot" demo in the Plot Gallery example app. With CPTAxisLabelingPolicyNone
, the tick marks and labels are independent, so if you want tick marks, you also need to set the majorTickLocations
and/or minorTickLocations
.