hwriteSVG(image.url, page = NULL, width = 500, height = 500, id = "", attributes = "border = '0'", ...)
newPage
or
openPage
.hwrite
call.
tag required depend on
the browser used to view the document. hwriteSVG
uses syntax
taken from support documentation for the SVG Web project. The example
given in the sample helloworld.html
is
Note that recent versions of Firefox should display SVG images without problems, and should not require the specification of height and width. Internet Explorer is far less foregiving and both height and width values must be given or no image will be displayed. Experimentation with appropriate values for the arguments may be necessary.
For attributes which may be included in an tag, see
the reference for this tag on the website
http://www.w3schools.com.
hwriteImage
examplesDir <- file.path(system.file(package = 'hwriterPlus'),
'examples')
catsSVG <- file.path(examplesDir, "cats.svg")
### Raw html produced
hwriteSVG(catsSVG, page = NULL, height = 600, width = 600,
center = FALSE, br = TRUE)
### Formatted a little more nicely
svgHTML <- hwriteSVG(catsSVG, page = NULL, height = 600, width = 600,
center = FALSE, br = TRUE)
unlist(strsplit(svgHTML, "\n"))
Run the code above in your browser using DataLab