canvas {canvas}R Documentation

R graphics device targetting the HTML canvas element

Description

canvas initializes a new graphics device that implements the CanvasRenderingContext2D javascript api.

Usage

canvas(file="", width = 640, height = 480, bg="transparent",...)

Arguments

file name of the file to be created.
width width of the plot area.
height height of the plot area.
bg starting background color.
... not implemented.

Value

Returns the NULL value invisibly.

Examples

# very simple plot
canvas(600, 600, file="plot.js")
plot(rnorm(4000),rnorm(4000),col="#ff000018",pch=19,cex=2) # semi-transparent red
dev.off() # creates a file "plot.js" with the above plot

[Package canvas version 0.1-0 Index]