
Creates the necessary SVG and XML files for a graph object (as long as graph type is supported). Then turns them into a html file and opens it for viewing (if a interactive session) in your browser.
MakeAccessibleSVG(x,
file = paste0(deparse(substitute(x)), "-SVG"),
view=interactive(), cleanup = TRUE, ...)
# S3 method for ggplot
MakeAccessibleSVG(x,
file = paste0(deparse(substitute(x)), "-SVG"),
view=interactive(), cleanup = TRUE, VI_and_Describe = TRUE, ...)
NULL. This function is solely for the purpose of creating SVG and XML files and displaying them
a graph object for which a method exists
The shared name for the SVG, XML and HTML files to be created. It will also be the title of the html webpage.
launch in browser; this is the default when in interactive session
Whether the function should remove the svg and xml files after they have bee embedded into the hmtml file.
Whether to include the VI and Describe outputs in the built webpage.
arguments passed on to other methods/functions
A. Jonathan R. Godfrey, Volker Sorge and James A. Thompson
This function can be thought of as just a shortcut for quickly creating a SVG webpage for exploration. Each individual step can be done with the SVGThis()
, AddXML()
and BrowseSVG()
functions. Using this is currently the quickest workflow for accessing the SVG features of BrailleR.
More information can be found in the Exploring graphs vignette.
It has support for some of the base plots however you can consider this support deprecated.
P. Dengler et al. (2011) Scalable vector graphics (SVG) 1.1, second edition. W3C recommendation, W3C. http://www.w3.org/TR/2011/REC-XML11-20110816/
SVGThis
, AddXML
, BrowseSVG
#Base R
#boxplot = boxplot(rnorm(1e4))
#MakeAccessibleSVG(boxplot, view = F)
#attach(airquality)
#scatter = ScatterPlot(x=Wind, y=Ozone, pch=4, base=TRUE)
#detach(airquality)
#MakeAccessibleSVG(scatter)
#ggplot2
library(ggplot2)
tsplot = TimeSeriesPlot(airquality, x=airquality$Temp)
MakeAccessibleSVG(tsplot)
barChart = ggplot(Orange, aes(x = Tree)) +
geom_bar()
MakeAccessibleSVG(barChart)
histogram = ggplot(attenu, aes(x=dist)) +
geom_histogram()
histogram
MakeAccessibleSVG(histogram)
# Cleaning up
unlink("barChart-SVG.html")
unlink("histogram-SVG.html")
unlink("tsplot-SVG.html")
Run the code above in your browser using DataLab