Learn R Programming

webvis (version 0.0.2)

pv.rule: Add an rule to the visualization.

Description

Add an rule to the visualization.

Usage

pv.rule(axis, data, left, left.name, left.scale, bottom, bottom.name, bottom.scale, ...)

Arguments

axis
can be either "x" or "y"
data
The data to be used in the function.
left
an exact position w.r.t. the left side of the panel
bottom
an exact position w.r.t. the bottom side of the panel
bottom.name
The name of the field in the supplied data frame or vector.
left.name
The name of the field in the supplied data frame or vector.
bottom.scale
The name of the field in the supplied data frame or vector.
left.scale
The name of the field in the supplied data frame or vector.
...
The parameters from pv.chart

Value

Details

pv.rule Add an rule to the visualization.

References

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

See Also

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

Examples

Run this code
wv <- pv.panel(width=300, height=200, left=20, top=20, right=20, bottom=20)
wv <- wv + (pv.rule(wv=wv, data=data, axis="y", stroke.style="rgba(128,128,128,.2)", scale.min=0) + pv.label(anchor="right", text.name="y"))
wv <- wv + (pv.rule(wv=wv, data=1:10, axis="x", stroke.style="rgba(128,128,128,.2)") + pv.label(anchor="bottom", text.name="x"))
wv <- wv + pv.line(wv=wv, data=data, scale.min=0)
render.webvis(wv)

Run the code above in your browser using DataLab