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

Description Usage Arguments Details Value Author(s) References Examples

Description

Generic function for all Protovis mark types.

Usage

1
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.

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.

Value

A webvis object.

Author(s)

Shane Conway shane.conway@gmail.com

References

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

Examples

1
2
3
4
5
6
data <- data.frame(y=1:5)
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))

leeper/rwebvis documentation built on May 21, 2019, 1:39 a.m.