It has an int style instance variable, defining how the axis should draw itself. The relevant methods are :
-(id)initWithStyle:(int)the_style;
-(int)style;
-(void)setStyle:(int)newStyle;
The style is a combination (OR) of flags :
- PHShowGrid
- PHShowGraduationAtLeft
- PHShowGraduationAtBottom
- PHShowGraduationAtTop
- PHIsLog
- PHSmall
- PHBig
PHSmall and PHBig define how many major tickmarks you would have, and allows one to customize the display according to the size of the view.
It has color, which can be set with :
-(void)setColor:(NSColor*)newColor;
To override automatic ticks generation :
-(void)setMajorTickWidth:(double)newValue;
-(void)unsetMajorTickWidth;
-(void)setMinorTicksNumber:(int)newValue;
Other useful methods include :
-(void)setMinimum: (double)newMinimum maximum:(double)newMaximum;
which defines the range of an axis
-(void)zoomin;
-(void)zoomout;
which perform a centered zoom (by a factor 2)
-(double)minimum;
-(double)maximum;
return the range values
-(double)convertValue:(float)x;
converts a float between 0 and 1 into a double in the axis range