pv.area: Add a bar to the visualization.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Add a bar to the visualization.

Usage

1
2
pv.area(bottom=0, height.name="y", left.name="x", height.scale=paste("linear", height.name, "y", sep = "."), left.scale=paste("linear", left.name, "x", sep =
    "."), scale.min=0, ...)

Arguments

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

height.scale

The scale of the field in the supplied data frame or vector.

left.scale

The scale of the field in the supplied data frame or vector.

bottom

The distance from the bottom of the panel.

scale.min

The minimum value for the y-axis scale.

...

The parameters from pv.chart

Details

pv.area Adds a bar plot to the visualization

Value

A wv object.

Author(s)

Shane Conway shane.conway@gmail.com

References

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

See Also

pv.chart that creates the webvis object.

Examples

 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
# line example 1 (using layers)
wv <- pv.panel(width=150, height=150)
render.webvis(wv + pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), bottom=0, height.name="y", left.name="x", height.scale="linear.y.y", left.scale="linear.x.x"))

wv <- pv.panel(width=150, height=150)
render.webvis(wv + pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2)))

# line example 2 (need to make sure that it doesn't go over the edge
wv <- pv.panel(width=150, height=150)
wv <- wv + (pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), height.name="y", left.name="x", height.scale="linear.y.y", left.scale="linear.x.x"))
render.webvis(wv)

# line example 4
wv <- pv.panel(width=150, height=150)
render.webvis(wv + pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), top.name="y", left.name="x", top.scale="linear.y.y", left.scale="linear.x.x"))

# line example 5
wv <- pv.panel(width=150, height=150)
render.webvis(wv + pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), bottom=0, top.name="y", right.name="x", top.scale="linear.y.y", right.scale="linear.x.x"))

# line example 7
wv <- pv.panel(width=150, height=150)
render.webvis(wv + pv.area(wv=wv, data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), bottom.name="y", left.name="x", bottom.scale="linear.y.y", left.scale="linear.x.x", interpolate="step-after"))

#pv.area(data=c(1, 1.2, 1.7, 1.5, .7, .5, .2), height.name="y", left.name="x", height.scale="linear.y.y", left.scale="linear.x.x", ymin=10, ymax=100, bottom=0, render=TRUE)

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