Learn R Programming

webvis (version 0.0.2)

plot.webvis: Simplified plot function for web vis plots.

Description

Simplified plot function for web vis plots.

Usage

plot.webvis(x, y, type="dot", width=300, height=200, add.grid=TRUE, add.axes=TRUE, scale.min, ...)

Arguments

x
Either the "x" axis data or all the data for the visualization (can be vector or dataset).
y
Optional, can specify the "y" axis data.
type
The type of plot. Can be "bar", "line", "area", "pie", "dot", or "shape"
width
The width of the panel in pixels.
height
The width of the panel in pixels.
add.grid
Logical value for whether to add a grid.
add.axes
Whether to add x-y axes.
scale.min
Whether the y-axis should be scaled to zero or the minimum value in the data
...
Other parmaeters for pv.chart.

Value

Details

plot.webvis Simplified plot function for web vis plots

References

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

See Also

new.webvis that creates the webvis object.

Examples

Run this code
plot.webvis(x=c(1, 2, 1.5, 3, 1.2), type="area")
plot.webvis(c(1, 2, 1.5, 3, 1.2, 1.7, 2.5, 6, 5), add.grid=FALSE)
plot.webvis(c(1, 2, 1.5, 3, 1.2, 1.7, 2.5, 6, 5), type="area")
plot.webvis(c(1, 2, 1.5, 3, 1.2, 1.7, 2.5, 6, 5), type="line", scale.min=0)
plot.webvis(c(1, 2, 1.5, 3, 1.2, 1.7, 2.5, 6, 5), type="line", scale.min=NULL)
plot.webvis(x=10*rnorm(20), width=500, height=500, type="line")
plot.webvis(x=100*rnorm(20), y=100*rnorm(20), width=500, height=500, type="dot")
plot.webvis(x=c(1, 2, 1.5, 3, 1.2), type="pie")
plot.webvis(x=c(1, 2, 1.5, 3, 1.2), type="pie", inner.radius=80)
plot.webvis(x=1:5, y=c(1, 2, 1.5, 3, 1.2), type="area")

Run the code above in your browser using DataLab