exportSVG: Export iNZightPlots as an SVG

View source: R/exportSVG.R

exportSVGR Documentation

Export iNZightPlots as an SVG

Description

exportSVG is designed to export the iNZight plot as a temporary SVG that is opened in a web browser. The iNZightPlot must be drawn to a graphics device before exporting can occur.

Usage

exportSVG(x, file = tempfile(fileext = ".svg"), ...)

## S3 method for class ''function''
exportSVG(
  x,
  file = tempfile(fileext = ".svg"),
  width = dev.size()[1],
  height = dev.size()[2],
  ...
)

## S3 method for class 'inzplotoutput'
exportSVG(x, file = tempfile(fileext = ".svg"), ...)

Arguments

x

iNZight plot object or function that captures iNZight environment

file

Name of temporary svg file generated (by default: 'inzightplot.svg')

...

additional arguments

width

the width of the plot device

height

the height of the plot device

Value

Opens up an SVG file of x with filename file in a web browser

Methods (by class)

  • exportSVG(`function`): method for functions

  • exportSVG(inzplotoutput): method for an existing plot object

Author(s)

Yu Han Soh


iNZightVIT/iNZightPlots documentation built on April 8, 2024, 10:24 a.m.