ploticus: proc pie

## proc pie | Welcome Gallery Handbook |
| Manual page for proc_pie(PL)

## DESCRIPTION

Display a pie graph.`` Values will be displayed as a proportion of the sum, unless the `total` attribute is specified.``

## FEATURES

Automatic labeling in several different modes.``

Exploding of one slice, selected slices or all slices.``

Single color or multiple colors.``

HTML clickmap support for pie graph labels (`clickmapurl`).``

## EXAMPLES

See the Gallery Pie page

## UNPLOTTABLE DATA

proc pie will omit data points that are not valid or not within the plotting area.``

## PREREQUISITES

proc getdata must have been invoked to access or define some data.`` A plotting area does not need to be set up (using proc areadef), unless locations, lengths, etc. are to be specified in scaled units.``

## MANDATORY ATTRIBUTES

The `datafield`, `center`, and `radius` attributes MUST be specified.``

## ATTRIBUTES

datafield dfield

  The field to get the values from.``

center x y

  Location of the center of the pie.`` Example: `center: 3 5.6`

radius lenvalue

  Radius of the pie.`` Example: `radius: 1.5`

firstslice n

  Controls where, in degrees, that the first slice will be displayed.`` Default is 0 (the top). 90 corresponds to the three o'clock position.`` Slices are displayed in clockwise order.`` This may be useful to control where to slices fall, or to work around a label collision problem.``
  Example: `firstslice: 45`

labelmode `legend` | `labelonly` | `line+label`

  Selects the method for labeling pie slices.`` The default is `legend`.``
  `legend`: legend entries will be accumulated so that a legend can be rendered subsequently using proc legend.``
  `labelonly`: pie slice labels will be superimposed onto or outside the pie slices with no connecting lines.``
  `line+label`: pie slice labels will be rendered outside of the pie with connecting lines.``
  The `labelfarout` attribute may be helpful in positioning the labels. If labels collide, the `firstslice` attribute may be used to rotate the pie which may alleviate the problem.``
  Labels text may be taken from data field (`labelfield` or be specified directly (`labels`).
  Example: `labelmode: line+label`

labelfield dfield

  If specified, label text will be taken from this data field.`` Text may contain the characters `\n` to symbolize line breaks.`` The label text may contain the special symbol @PCT which will evaluate to the percentage of the current slice (use `pctfmt` attribute to control decimal format of @PCT).``
  Example: `datafield: 2`

labels multi-line text

  If specified, label text will be taken from this attribute, one line per pie slice.`` Text may contain the characters `\n` to symbolize line breaks.`` Remember to terminate the multi-line text with a blank line.`` Label text may contain the special symbol @PCT which will evaluate to the percentage of the current slice (use `pctfmt` attribute to control decimal format of @PCT).``
  Example:
  ``

      labels:   Canada
      	  Mexico
      	  United\nStates

  ``

labelfarout z

  This attribute may be specified in order to control the placement of labels. It is a proportion of the radius. A value less than 1.0 will place labels inside the pie circle; a value greater than 1.0 will place labels outside the pie circle. If `labelmode` is `line+label` then z should be `1.2` or greater.``

colors color list

  A space-separated list of colors, one per slice.`` If all slices are to be the same color, just specify one color.`` If the number of slices is more than the number of colors, the last color is used for the remaining slices.`` You can also just say `auto` which will use a pre-selected color sequence.``
  Example: `color: red green orange blue`

explode w1.. wN

  A space separated list of values, one per slice.`` If all slices are to be exploded by the same amount, just specify one value. If the number of slices is more than the number of values, the last value is used for the remaining slices.``
  Each value is a proportion of the radius.`` A value of `0.2` will explode a slice by 20% of the amount of the radius.`` A value of `0.3` will explode a slice by 30%.`` A value of `0.0` will not do any exploding.`` Thus, one slice, selected slices, or all slices may be exploded.``
  Example: `explode: 0 0 0.2 0 0 0`

total n

  Normally, the sum of all data is assumed to be the denominator for determining pie slice proportions. However, if `total` is specified, it is taken to be the denominator.`` This may be useful if the sum of the values do not represent the whole.``
  Example: `total: 285`

outlinedetails linedetails

  Details pertaining to the slice outlines.`` To turn off slice outlines, use `none`.``
  Example: `linedetails: width=1.0 color=yellow`

textdetails textdetails

  Details pertaining to the label text.``
  Example: `textdetails: color=blue size=10`

lablinedetails linedetails

  Details pertaining to the lines that may be rendered with the labels.``

pctformat printf-spec

  Controls the format of percentages shown in the labels when @PCT is used.``
  Example: `pctformat: %g`

clickmapurl url template

  If generating an HTML clickmap , this specifies a url template, and causes the pie graph labels to be mapped.`` This attribute usually contains one or more embedded data field references preceded by double at-sign (@@).`` See HTML clickmap for more details and examples.``
  Example: `clickmapurl: http://abc.com/mycgi?category=@@3`
  data display engine
  Copyright Steve Grubb

Markup created by unroff 1.0, `` `` December 10, 2002.