Opens a graphics device that records subsequent plotting commands as
JavaScript CanvasRenderingContext2D calls, writing them to a
self-contained HTML file as they happen. Each new page of plotting
(for instance, each top-level graphics::plot() call, or each panel of
a par(mfrow = ...) layout) starts a fresh <canvas> element in the
file, so a device left open across several plots produces several
canvases stacked down the page. Close the device with
grDevices::dev.off() to finish writing the file.
Arguments
- file
Path of the HTML file to create.
- width, height
Device size, in pixels (used directly as the
width/heightattributes of the<canvas>element).- pointsize
The default font pointsize, in big points (1/72 inch), following the same convention as
grDevices::pdf()and friends.- bg
Default background colour, as a colour name or other value accepted by
grDevices::col2rgb().