Learn R Programming

webvis (version 0.0.2)

pv.wedge: Add a wedge to the visualization (for pie charts, etc).

Description

Add a wedge to the visualization (for pie charts, etc).

Usage

pv.wedge(wv=pv.panel(), left, bottom, angle.name="y", inner.radius, outer.radius, outer.radius.name, ...)

Arguments

wv
A webvis object (defaults to an empty panel).
left
Where the pie chart will be centered w.r.t. the left side of the panel.
bottom
Where the pie chart will be centered w.r.t. the bottom of the panel.
angle.name
The name of the data field which contains the angle of each wedge.
inner.radius
The inner radius of the chart.
outer.radius
The outer radius of the chart (defaults to the width/height).
outer.radius.name
The name of a data field for varying radius for each wedge.
...
The parameters from pv.chart

Value

Details

pv.wedge Add a wedge to the visualization (for pie charts, etc).

References

http://code.google.com/p/protovis-js/wiki/PvWedge

See Also

pv.chart, a more low-level charting function.

Examples

Run this code
pv.wedge(data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), outer.radius=70, angle.name="y", render=TRUE)
pv.wedge(data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), inner.radius=50, outer.radius=70, angle.name="y", render=TRUE)
pv.wedge(data=data.frame(y=c(1, 1.2, 1.7, 1.5, .7, .5, .2), rad=15*(1:7)), inner.radius=50, outer.radius.name="rad", angle.name="y", render=TRUE)

Run the code above in your browser using DataLab