canvas {canvas} | R Documentation |
canvas
initializes a new graphics device that implements
the CanvasRenderingContext2D javascript api.
canvas(file="", width = 640, height = 480, bg="transparent",...)
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. |
Returns the NULL value invisibly.
# 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