help radar
-------------------------------------------------------------------------------

Title

Radar plots or Spider plots

Syntax

radar axes_labels var1 [var2 ... ] [, options]

options Description ------------------------------------------------------------------------- Main lc(colorlist) specifies a list of colors for the observations (not axes). lp(patternlist) specifies a list of patterns for the observations (not axes). lw(linewidthlist) specifies a list of line widths for the observations (not axes). rlabel(numlist) specifies the ticks and labels of the spokes. twoway_options specifies additional twoway options (not all of them area allowed), for example titles() and notes(). -------------------------------------------------------------------------

Description

radar produces a radar plot from at least two variables. The first variable must always contain the label for the axes and the second variable must be numeric. For example the dataset below,

. list food level +----------------+ | food level | |----------------| 1. | beer 12 | 2. | crisps 5 | 3. | bread 3 | 4. | veg 44 | 5. | fruit 7 | +----------------+

The axes of the radar plot will start at the top of the diagram and proceed in a clockwise direction. With the above dataset the first axes will be labelled beer.

Missing values are included in the radar plot as gaps in the line joining observations. This option is implemented using the cmiss(n) option of the twoway line graph, see help connect_options.

Options

+------+ ----+ Main +-------------------------------------------------------------

lc(colorlist) specifies a list of colors for the observations (not axes).

lp(patternlist) specifies a list of patterns for the observations (not axes).

lw(linewidthlist) specifies a list of line widths for the observations (not axes).

rlabel(numlist) specifies the ticks and labels of the spokes. The default is to have 5 values displayed, note that the value that is the centre or smallest tick is suppressed but the value is included as a note below the graph. The note can be overwritten by using the note() option.

twoway_options specifies additional twoway options, for example titles() and notes().

Examples

The examples below highlight the use of the radar plot on the Auto dataset. The only limitation is the number of "spokes" hence the commands are limited to just the foreign cars. Technical note: the limitation on the number of spokes is unknown because the limit is due to the size of macros being returned as part of a rclass program.

Click below to load dataset

sysuse auto

Click below (after the dataset is loaded to see the distribution of weight for the foreign makes of car

radar make weight if foreign

Click below to see the distribution of turn mpg and trunk for each foreign make of car.

radar make turn mpg trunk if foreign radar make turn mpg trunk if foreign, title(Nice Radar graph) radar make turn mpg trunk if foreign, title(Nice Radar graph) lc(red blue green) lp(dash dot dash_dot)

radar make turn mpg trunk if foreign, title(Nice Radar graph) lc(red blue green) r(0 12 14 18 50)

radar make turn mpg trunk if foreign, title(Nice Radar graph) lc(red blue green) lw(*1 *2 *4) r(0 12 14 18 50)

There is no real advantage of a radar diagram compared to a scatter plot unless there was some sort of directional data.

Author

Adrian Mander, MRC Biostatistics Unit, Cambridge, UK.

Email adrian.mander@mrc-bsu.cam.ac.uk

See Also

Other Graphic Commands I have written:

batplot (if installed) ssc install batplot (to install) cdfplot (if installed) ssc install cdfplot (to install) contour (if installed) ssc install contour (to install) drarea (if installed) ssc install drarea (to install) graphbinary (if installed) ssc install graphbinary (to install) metagraph (if installed) ssc install metagraph (to install) palette_all (if installed) ssc install palette_all (to install) plotbeta (if installed) ssc install plotbeta (to install) plotmatrix (if installed) ssc install plotmatrix (to install) surface (if installed) ssc install surface (to install) trellis (if installed) ssc install trellis (to install)