File: pie.html

package info (click to toggle)
ploticus 2.0.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,696 kB
  • ctags: 2,035
  • sloc: ansic: 40,100; perl: 456; sh: 186; makefile: 129
file content (345 lines) | stat: -rw-r--r-- 8,937 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<html>
<head>
<!-- This file has been generated by unroff 1.0, 12/11/01 13:49:18. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
-->
</STYLE>
<title>ploticus: proc pie</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc pie</h2></td>
  <td align=right>
  <small>
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
  <a href="../doc/Contents.html">Handbook</a> 
  <td></tr></table>
</td></tr>
<td>
<br>
<br>

<title>Manual page for proc_pie(PL)</title>
</head>
<body>
 
<center>
<img src="../gallery/pie0.gif">
</center>

<h2>DESCRIPTION</h2>
Display a pie graph.<tt> </tt>
Values will be displayed as a proportion of the sum, unless
the <tt>total</tt> attribute is specified.<tt> </tt>

<br><br><br>
<h2>FEATURES</h2>
Automatic labeling in several different modes.<tt> </tt>
<p>
Exploding of one slice, selected slices or all slices.<tt> </tt>
<p>
Single color or multiple colors.<tt> </tt>
<p>
<a href="clickmap.html">
 HTML clickmap
</a>
support for pie graph labels (<tt>clickmapurl</tt>).<tt> </tt>

<br><br><br>
<h2>EXAMPLES</h2>
See the Gallery Pie page
<a href="../gallery/gall.pie.html"><img src="../gallery/btn/here.gif"></a>

<br><br><br>
<h2>UNPLOTTABLE DATA</h2>
<b>proc pie</b> will omit data points that are not valid
or not within the plotting area.<tt> </tt>

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


<br><br><br>
<h2>MANDATORY ATTRIBUTES</h2>
<p>
The <tt>datafield</tt>, <tt>center</tt>, and <tt>radius</tt> attributes
MUST be specified.<tt> </tt>

<br><br><br>
<h2>ATTRIBUTES</h2>
<p>
<b>datafield</b>
<a href="attributetypes.html#datafield">
<i> dfield </i>
</a>
<dl>
<dt><dd><p>
The field to get the values from.<tt> </tt>

</dl>
<p>
<b>center</b>
<a href="attributetypes.html#xy">
<i> x y </i>
</a>
<dl>
<dt><dd><p>
Location of the center of the pie.<tt> </tt>
Example: <tt>center: 3 5.6</tt>

</dl>
<p>
<b>radius</b>
<a href="attributetypes.html#lenvalue">
<i> lenvalue </i>
</a>
<dl>
<dt><dd><p>
Radius of the pie.<tt> </tt>
Example: <tt>radius: 1.5</tt>

</dl>
<p>
<b>firstslice</b> <i>n</i>
<dl>
<dt><dd><p>
Controls where, in degrees, that the first slice will be displayed.<tt> </tt>
Default is 0 (the top).  90 corresponds to the three o'clock position.<tt> </tt>
Slices are displayed in clockwise order.<tt> </tt>
This may be useful to control where to slices fall, or to work around
a label collision problem.<tt> </tt>
<br>
Example: <tt>firstslice: 45</tt>

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

</dl>
<p>
<b>labelfield</b>  
<a href="attributetypes.html#dfield">
<i> dfield </i>
</a>
<dl>
<dt><dd><p>
If specified, label text will be taken from this data field.<tt> </tt>
Text may contain the characters <tt>\n</tt> to symbolize line breaks.<tt> </tt>
The label text may contain the special symbol
<b>@PCT</b> which will evaluate to the percentage of the current slice
(use <tt>pctfmt</tt> attribute to control decimal format of @PCT).<tt> </tt>
<br>
Example: <tt>datafield: 2</tt>

</dl>
<p>
<b>labels</b>
<a href="attributetypes.html#text">
<i> multi-line text</i>
</a>
<dl>
<dt><dd><p>
If specified, label text will be taken from this attribute, one line
per pie slice.<tt> </tt>
Text may contain the characters <tt>\n</tt> to symbolize line breaks.<tt> </tt>
Remember to terminate the multi-line text with a blank line.<tt> </tt>
Label text may contain the special symbol
<b>@PCT</b> which will evaluate to the percentage of the current slice
(use <tt>pctfmt</tt> attribute to control decimal format of @PCT).<tt> </tt>
<br>
Example:
<br>
<tt></tt><pre>
labels:   Canada
	  Mexico
	  United\nStates

</pre>
<tt></tt>
</dl>
<p>
<b>labelfarout</b> <i>z</i>
<dl>
<dt><dd><p>
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 <tt>labelmode</tt> is <tt>line+label</tt>
then <i>z</i> should be <tt>1.2</tt> or greater.<tt> </tt>

</dl>
<p>
<b>colors</b>
<a href="color.html">
<i> color list</i>
</a>
<dl>
<dt><dd><p>
A space-separated list of colors, one per slice.<tt> </tt>
If all slices are to be the same color, just specify one color.<tt> </tt>
If the number of slices is more than the number of colors, the
last color is used for the remaining slices.<tt> </tt>
You can also just say <tt>auto</tt> which will use a pre-selected
color sequence.<tt> </tt>
<br>
Example: <tt>color: red green orange blue</tt>

</dl>
<p>
<b>explode</b> <i>w1</i>.. <i>wN</i>
<dl>
<dt><dd><p>
A space separated list of values, one per slice.<tt> </tt>
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.<tt> </tt>
<dt><dd><p>
Each value is a proportion of the radius.<tt> </tt>
A value of <tt>0.2</tt> will explode a slice by 20% of the amount of the radius.<tt> </tt>
A value of <tt>0.3</tt> will explode a slice by 30%.<tt> </tt>
A value of <tt>0.0</tt> will not do any exploding.<tt> </tt>
Thus, one slice, selected slices, or all slices may be exploded.<tt> </tt>
<br>
Example: <tt>explode: 0 0 0.2 0 0 0</tt>


</dl>
<p>
<b>total</b> <i>n</i>
<dl>
<dt><dd><p>
Normally, the sum of all data is assumed to be the denominator
for determining pie slice proportions.  
However, if <tt>total</tt> is specified, it is taken to be the denominator.<tt> </tt>
This may be useful if the sum of the values do not represent the whole.<tt> </tt>
<br>
Example: <tt>total: 285</tt>

</dl>
<p>
<b>outlinedetails</b>
<a href="linedetails.html">
<i> linedetails </i>
</a>
<dl>
<dt><dd><p>
Details pertaining to the slice outlines.<tt> </tt>
To turn off slice outlines, use <tt>none</tt>.<tt> </tt>
<br>
Example: <tt>linedetails: width=1.0 color=yellow</tt>

</dl>
<p>
<b>textdetails</b>
<a href="textdetails.html">
<i> textdetails </i>
</a>
<dl>
<dt><dd><p>
Details pertaining to the label text.<tt> </tt>
<br>
Example: <tt>textdetails: color=blue size=10</tt>

</dl>
<p>
<b>lablinedetails</b>
<a href="linedetails.html">
<i> linedetails </i>
</a>
<dl>
<dt><dd><p>
Details pertaining to the lines that may be rendered with the labels.<tt> </tt>

</dl>
<p>
<b>pctformat</b> 
<a href="attributetypes.html#printfspec">
<i> printf-spec </i>
</a>
<dl>
<dt><dd><p>
Controls the format of percentages shown in the labels
when @PCT is used.<tt> </tt>
<br>
Example: <tt>pctformat: %g</tt>

</dl>
<p>
<b>clickmapurl</b> <i>url template</i>
<dl>
<dt><dd><p>
If generating an
<a href="clickmap.html">
 HTML clickmap
</a>
, this specifies a url template, and causes the
pie graph labels to be mapped.<tt> </tt>
This attribute usually contains one or more embedded
<a href="attributetypes.html#dfield">
 data field references
</a>
preceded by double at-sign (@@).<tt> </tt>
See
<a href="clickmap.html">
 HTML clickmap
</a>
for more details and examples.<tt> </tt>
<br>
Example: <tt>clickmapurl: http://abc.com/mycgi?category=@@3</tt>

<br>
<br>
</td></tr>
<td align=right>
<a href="Welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>
</dl>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>December 11, 2001.
</body>
</html>