Class PolarAxis Extends Axis
(Defined in: jpgraph_polar.php : 151)
 
 PolarAxis  Axis 
 HideTicks() 
 SetAngleFont() 
 SetAngleStep() 
 SetColor() 
 SetGridColor() 
 SetTickColors() 
 ShowAngleDegreeMark() 
 ShowAngleLabel() 
 ShowGrid() 
 StrokeLabels() 
 __construct() 
 

Class usage and Overview
Represents the different axis for a polar plot. This class holds the property both for the radius and the angle axis classes. It is accessed throught the 'axis' property in the PolarGraph class.

 

See also related classes:
PolarGraph

 


Class Methods

 

PolarAxis ::
HideTicks($aFlg, $aAngleFlg)
HIde ticks marks

ArgumentDefaultDescription
$aFlg true Hide radius tick marks
$aAngleFlg true Hide angle tick marks

Description:
HIde ticks marks 

Example:

// Hide just the angle tick marks
$polargraph->axis->HideTicks(false,true);

 

PolarAxis ::
SetAngleFont($aFontFam, $aFontStyle, $aFontSize)
Set font for angles

ArgumentDefaultDescription
$aFontFam  Font family
$aFontStyle FS_NORMAL Font style
$aFontSize 10 Font size

Description:
Set font for angle labels on the polar graph. 

Example:

$polargraph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8);

 

PolarAxis ::
SetAngleStep($aStep)
Set angle step

ArgumentDefaultDescription
$aStep  Step in degrees

Description:
Specify the angle step, in degrees, between the angle markers. 

Example:

// Set 20 degrees between each marker
$polargraph->axis->SetAngleStep(20);

 

PolarAxis ::
SetColor($aColor, $aRadColor, $aAngleColor)
Specify axis and label colors

ArgumentDefaultDescription
$aColor  Color for radius axis
$aRadColor '' Color for radius labels
$aAngleColor '' Color for angle labels

Description:
Specify axis and label colors. 
 
See also:

Example:

$polargraph->axis->SetColor('black','navy','darkred');

 

PolarAxis ::
SetGridColor($aMajorColor, $aMinorColor, $aAngleColor)
Set colors for the various grids

ArgumentDefaultDescription
$aMajorColor  Major radius grid color
$aMinorColor '' Minor radius grid color
$aAngleColor '' Angle grid color

Description:
Set colors for the various grids 

Example:

// Set "Soft" colors for the grid
$polargraph->axis->SetGridColor('lightgray','lightgray','lightgray');

 

PolarAxis ::
SetTickColors($aRadColor, $aAngleColor)
Specify color for axis tick marks

ArgumentDefaultDescription
$aRadColor  Radius axis colors
$aAngleColor '' Angle axis colors

Description:
Specify color for axis tick marks 

Example:

$polargraph->axis->SetTickColor('red');

 

PolarAxis ::
ShowAngleDegreeMark($aFlg)
Add a degree mark after each angel label

ArgumentDefaultDescription
$aFlg true True=Add mark

Description:
Add a degree mark after each angel label ( a small sperscripted 'o' ). This is enabled by default. 

Example:

$polargraph->axis->ShowAngleDegreeMark(true);

 

PolarAxis ::
ShowAngleLabel($aFlg)
Show angle labels

ArgumentDefaultDescription
$aFlg true True=show labels

Description:
Show angle labels. This is on by default. 

Example:

// Enable angle labels
$polargraph->axis->ShowAngleLabel();

 

PolarAxis ::
ShowGrid($aMajor, $aMinor, $aAngle)
Determine what grid lines should be visible

ArgumentDefaultDescription
$aMajor true Show major radius grid lines
$aMinor false Show minor radius grid lines
$aAngle true Show angle grid lines

Description:
Determine what grid lines should be visible. 

Example:

// Just display major radius grid line and angles
$polargraph->axis->ShowGrid(true,false,true);