2015-05 Generating SVG for Web Pages with the gridSVG Package

This document describes several different techniques for including SVG images within a web page and points out the important SVG attributes that control the final appearance of the SVG image within the web page. The document then describes how to control those attributes when generating SVG images with the ‘gridSVG’ package for R.

Paul Murrell


2013-9 Improved Importing of Vector Graphics in R

The grImport2 package imports vector images that are stored in the SVG image format for inclusion within images generated by R. The original grImport package performs the same task, but instead using PostScript images as its source image format. This technical report describes the steps taken to improve not only the grImport package, but also follows the development of two new packages, grImport2 and grConvert. The latter, grConvert, converts images from popular vector image formats (PostScript, PDF and SVG) into valid input formats for grImport and grImport2. The grImport2 package is an entirely new package that does not suffer from some limitations of the grImport package, whose limitations are primarily due to the dependence on the PostScript image format.

Simon Potter and Paul Murrell

Read more.

2013-8 Selection and Navigation of Overlapping SVG Objects

SVG is a vector graphic image format that can be used with
browsers to deploy dynamic, interactive graphics over the web. We
present a method that enables generalised Selection and Navigation of
Overlapping SVG Objects by toggling pointer-events CSS styles and the
use of the mousewheel, adding another tool developers can use to grant
users greater and more intuitive interaction with SVG images. We also
present several live examples that demonstrate the method in practice,
both on script generated SVG images and an externally generated SVG image

Jimmy Oh

Read more

2013-7 Advanced SVG Graphics from R

The gridSVG package has recently provided an interface for
some more advanced SVG graphics features: gradient fills and pattern
fills, clipping paths, masks, and filters. This report describes a
simple test case for some of these advanced graphics features and then
explores some ideas for making use of these features in Statistical

Paul Murrell and Simon Potter

Read more

2013-4 Generating Structured and Labelled SVG

This article discusses the importance of providing structure and labelling within SVG code, particularly when the SVG code is generated indirectly by a high-level system and when the SVG code describes a complex image such as a statistical plot. We argue that this is a desirable goal, but that many high-level systems that generate SVG do not provide sufficient structure and labelling. An example of a system, based on R, that does provide structure and labelling, is described to demonstrate that the goal is acheivable and we highlight the crucial features of this system that we see as important factors in achieving this goal.

Paul Murrell and Simon Potter.


2013-3 Generating unique names in gridSVG

The gridSVG package exports grid images to the SVG image format for viewing on the web. This article describes the problems associated with retaining grid object names in SVG element id attributes. In addition, new features in gridSVG that allow manipulation and retrieval of generated id attributes are discussed. These new features allow for easier and more predictable development of interactivity in plots generated by gridSVG.

Simon Potter and Paul Murrell