Trace: » r005 » r004 » radar_plot
Table of Contents

Radar Plot

What is a Radar Plot?

Creating a radar plot is very simple. A radar plot displays a dataset in a polar (”circular”) coordinate system. Coordinates in a polar coordinate system are represented by an angle v and a radius r, and the conversion to a normal (Cartesian) coordinate system is:

x = r * cos(v)
y = r * sin(v)

A radar plots displays some x-value (the x coordinate in the dataset) which is translated to an angle based on the number of points in the dataset (i.e. if there are 8 points in the dataset the angles are 0, 45, 90, 135, 180, 225, 270, 315). The y-value then represents the radius - consider the plot as having an y-axis for each point pointing in the direction of the angle).


Radar Plot Example

Radar plots are also known as Spider plots (since the plot can resemble a spiderweb).

Radar Plot in Image_Graph

A Radar plot in Image_Graph consists of 2 things:

  1. A Radar Plot area - representing the polar coordinate system
  2. A Radar Plot - for the closed graph which is a special area chart which is a “closed” curve

Creating the plot area is very simple. Normally a plotarea is created using code similar to

$Plotarea =& $Graph->addNew('plotarea');

This is simply changed to creating the Radar plotarea instead of the normal

$Plotarea =& $Graph->addNew('Image_Graph_Plotarea_Radar');

Populating the dataset is done in the normal way, the next difference comes when the plot is added. This is simply accomplished by:

$Plot =& $Plotarea->addNew('radar', $Dataset);

Radar plots does currently not support stacked (or 100% stacked) charts. Multiple radar plots in one graph is supported either by adding many plot objects or using a dataset array as second parameter, in a similar fashion to a normal plot.

 
image_graph/radar_plot.txt · Last modified: 2006/02/22 18:19