Learn R Programming

webvis (version 0.0.2)

pv.mark: Generic function for all Protovis mark types.

Description

Generic function for all Protovis mark types.

Usage

pv.mark(wv, type, data, ..., anchor)

Arguments

wv
A webvis object
type
Can be "Line", "Bar", etc. (see Protovis API)
data
A dataset for plotting.
...
Any number of pv.param objects.
anchor
If anchoring to another object.

Value

Details

pv.mark Generic function for all Protovis mark types. This function can be used to create any kind of Protovis object regardless of whether it has been exposed separately.

References

http://vis.stanford.edu/protovis/

Examples

Run this code
pv.mark(wv=new.webvis(), type="Line", data=data, 
pv.param(name="data", value=data), 
pv.param(name="bottom", data.name="y", scale="linear.y.y"))
pv.mark(type="Label", ...=pv.param(name="text", data.name="y"))
pv.parse(pv.param(name="text", data.name="y"), data=data.frame(y=1:5))

Run the code above in your browser using DataLab