The scale for the radius can be either linear or logarithmic.
A polar graph is created by creating an instance of PolarGraph::PolarGraph(). The polar graph type inherits all the capabilities of ordinary X-Y graphs, i.e they can have background images, background gradients, tabbed titles and so on.
Polar graphs comes in two basic types, they can either show a full 360 degree graph or a half 180 degree graph. The two examples below show these two basic types of graphs.
By default the scale will be autoscaled depending on the data. You can also specify a manual scale by supplying an extra argument to the SetScale() value. The only difference from the manual scaling with the other X-Y-graphs is that for polar graph you only specify a manual maximu. The minimum will always be 0 for the linear scale and a scaled value of 10 (i.e 1, 0.1, 0.001 and so on) for the logarithmic scale.
The plot is clipped to the plot area so if you specify a smaller scale then the maximum value that part of the plot that are outside the plotarea will be clipped.
You select what gridlines to show with a call to PolarAxis::ShowGrid() The two example below shows a logarithmic plot with either just major gridlines or both minor and major gridlines.
For the angle grid lines it is possible to specify the angle division between each gridline with the method PolarAxis::SetAngleStep() You specify the step distance in degrees. By default the step size is 15 degrees.
You can adjust the color with the method PolarAxis::SetColor() ?>
The following example specifies different colro for the labels. it also shows that you can add both a radis axis title as well as a tabbed title. In this example we have also chosen not to show the frame around the edge of the plot.
For the radius labels all standard formatting that can be done to the X-Y axis such as format string or format callbacks are supported.
A common modification for polar plots is probbaly to disable the display the last label when using a 360 degree plot since the last label will "collide" with the plot box around the plot area. It is possible to disable the last label with a call to Axis::HideLastTickLabel() As you can see this has been sude in some of the examples in this chapter.
// Start by specifying the proper URL targets
$targets
= array("#1","#2", ....... );
$polarplot
= new PoalrPlot
($data);
$polarplot
->mark->SetType(
MARK_SQUARE);
$polarplot
->SetCSIMTargets
(targets);
$graph->Add(
$polarplot);
$graph->StrokeCSIM();