library(lattice)
## generate an xyplot, write it to file, and return HTML code that
## sources the generated image
dat <- data.frame( x = rnorm(100), y = rnorm(100) )
hSvg( file = "plot_output.svg",
xyplot( y ~ x, dat )
)
Run the code above in your browser using DataLab