Skip to main content

Scalable Vector Graphics

  • Chapter
  • First Online:
XML and Web Technologies for Data Sciences with R

Part of the book series: Use R! ((USE R))

  • 12k Accesses

Abstract

This chapter explores a powerful two-dimensional graphics format named SVG (scalable vector graphics), which is becoming widely used to represent object-based, vector (nonraster) graphics both on the Web and elsewhere. In addition to displaying scalable plots, the XML-based SVG format provides functionality for interactivity, animation, and a number of filtering effects that allow us to create rich graphical displays, and also to integrate them with Web pages. R can create static SVG displays, and we can post-process them within R as XML documents to add interaction and animation. We show how to provide simple interaction and animation with high-level R functions, and also how to add more customized interaction using R commands that use JavaScript at viewing time. We also discuss how to use both SVG and HTML to create rich “applications” and mash-ups in the Web browser.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Adobe. Flash player software, version 10.3. http://get.adobe.com/flashplayer/, 2011.

  2. Apache Software Foundation. The Apache Batik project: A Java-based toolkit for applications or applets that want to use images in scalable vector graphics (SVG), version 1.7. http://xmlgraphics.apache.org/batik/, 2008.

  3. Gabriel Becker and Duncan Temple Lang. RBrowserPlugin: R in the Web browser. https://github.com/gmbecker/RFirefox, 2012. R package version 0.1-5.

  4. Richard Becker, Allan Wilks, Ray Brownrigg, and Thomas Minka. maps: Draw geographical maps. http://cran.r-project.org/web/packages/maps/, 2011. R package version 2.1.

  5. Alex Berger, Alex Pucher, Alexandra Medwedeff, Andreas Neumann, Andre Winter, Christian Furpass, Christian Resch, Florent Chuffart, Florian Jurgeit, Georg Held, Greg Sepesi, Iris Fibinger, Klaus Forster, Martin Galanda, Nedjo Rogers, Nicole Ueberschar, Peter Sykora, Sudhir Kumar Reddy Maddirala, Thomas Mailander, Till Voswinckel, Tobias Bruehlmeier, Torsten Ullrich, and Yvonne Barth. Carto.net software. http://www.carto.net, 2010.

  6. Bert Bos, Tantek Celik, Ian Hickson, and Hakon Wium Lie. Cascading style sheets, level 2, revision 1 (CSS 2.1) specification. Worldwide Web Consortium, 2011. http://www.w3.org/TR/CSS2/.

  7. Cairo Graphics. Cairo: A 2D graphics library with support for multiple output devices, version 1.1. http://www.cairographics.org, 2006.

  8. Dan Carr, Nicholas Lewin-Koh, and Martin Maechler. hexbin: Hexagonal binning routines. http://www.bioconductor.org/packages/2.6/bioc/html/hexbin.html, 2009. R package version 1.22.

  9. J David Eisenberg. SVG Essentials. O’Reilly Media, Inc., Sebastopol, CA, 2002.

    Google Scholar 

  10. David Flanagan. JavaScript: The Definitive Guide. O’Reilly Media, Inc., Sebastopol, CA, 2006.

    Google Scholar 

  11. Jeffrey Horner. rApache: Web application development with R and Apache. http://rapache.net/, 2011. R package version 1.2.1.

  12. Chafic Kazoun and Joey Lott. Programming Flex 3: The Comprehensive Guide to Creating Rich Internet Applications with Adobe Flex. O’Reilly Media, Inc., Sebastopol, CA, 2008.

    Google Scholar 

  13. Bill Kennedy and Chuck Musciano. HTML and XHTML: The Definitive Guide. O’Reilly Media, Inc., Sebastopol, CA, 2006.

    Google Scholar 

  14. Jake Luciani. RSvgDevice: An RSVG graphics device. http://cran.r-project.org/web/packages/RSvgDevice/, 2009. R package version 0.6.

  15. Eric A Meyer. CSS Pocket Reference. O’Reilly Media, Inc., Sebastopol, CA, 2004.

    Google Scholar 

  16. Paul Murrell. R Graphics. Chapman & Hall/CRC, Boca Raton, FL, 2005.

    Google Scholar 

  17. Paul Murrell. gridBase: Integration of base and grid graphics. http://www.stat.auckland.ac.nz/˜paul/grid/grid.html, 2006. R package version 0.4.

  18. Paul Murrell. gridSVG: Export grid graphics as SVG. http://www.stat.auckland.ac.nz/˜paul/R/gridSVG/gridSVG_0.5-10.tar.gz, 2010. R package version 0.5.

  19. Paul Murrell. grid: The grid graphics package. http://cran.r-project.org/package=grid, 2011. R package version 2.16.0.

  20. Andreas Neumann and Andre Winter. Vector-based Web cartography: Enable SVG. http://www.carto.net/papers/svg/index_e.shtml, 2003.

  21. Deborah Nolan and Duncan Temple Lang. SVGAnnotation: Tools for post-processing SVG plots created in R. http://www.omegahat.org/SVGAnnotation, 2011. R package version 0.9.

  22. Deborah Nolan and Duncan Temple Lang. Interactive and animated scalable vector graphics and R data displays. Journal of Statistical Software, 46:1–88, 2012.

    Google Scholar 

  23. Dave Pawson. XSL-FO: Making XML Look Good in Print. O’Reilly Media, Inc., Sebastopol, CA, 2002.

    Google Scholar 

  24. Tony Plate. RSVGTipsDevice: An RSVG graphics device with dynamic tips and hyperlink. http://cran.r-project.org/web/packages/RSVGTipsDevice/, 2011. R package version 1.0.

  25. Hans Rosling. Gapminder: World. http://www.gapminder.org/world, 2008.

  26. Barry Rowlingson. imagemap: Create HTML imagemaps. http://www.maths.lancs.ac.uk/Software/Imagemap/, 2004. R package version 0.9.

  27. Deepayan Sarkar. Lattice: Multivariate Data Visualization with R. Springer-Verlag, New York, 2008. http://lmdvr.r-forge.r-project.org/figures/figures.html.

  28. Deepayan Sarkar. lattice: Lattice graphics. http://cran.r-project.org/web/packages/lattice/, 2011. R package version 0.19.

  29. John Simpson. XPath and XPointer: Locating Content in XML Documents. O’Reilly Media, Inc., Sebastopol, CA, 2002.

    Google Scholar 

  30. Debby Swayne, Dianne Cook, Duncan Temple Lang, and Andreas Buja. GGobi software, version 2.1. http://www.ggobi.org, 2010.

  31. Duncan Temple Lang. FlashMXML: A simple Flash graphics device for R. http://www.omegahat.org/FlashMXML, 2011. R package version 0.2-0.

  32. Duncan Temple Lang. XML: Tools for parsing and generating XML within R and S-PLUS. http://www.omegahat.org/RSXML, 2011. R package version 3.4.

  33. Martin Theus. Interactive data visualization using Mondrian. Journal of Statistical Software, 7:1–9, 2002.

    Google Scholar 

  34. Simon Urbanek and TobiasWichtrey. iplots: Interactive graphics for R. http://cran.rproject.org/web/packages/iplots/, 2011. R package version 1.1.

  35. W3Schools, Inc. JavaScript tutorial. http://www.w3schools.com/JS/default.asp, 2011.

  36. W3Schools.com. SVG tutorial. http://www.w3schools.com/svg/default.asp, 2011.

  37. Hadley Wickham. ggplot2: An implementation of the Grammar of Graphics. http://cran.r-project.org/web/packages/ggplot2/, 2010. R package version 0.8.

  38. Carl Worth and Keith Packard. Cairo: Cross-device rendering for vector graphics. http://cworth.org/˜cworth/papers/xr_ols2003/, 2003.

  39. Yihui Xie. animation: A gallery of animations in statistics and utilities to create animations. http://cran.r-project.org/web/packages/animation/, 2011. R package version 2.0.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer Science+Business Media New York

About this chapter

Cite this chapter

Nolan, D., Lang, D.T. (2014). Scalable Vector Graphics. In: XML and Web Technologies for Data Sciences with R. Use R!. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-7900-0_16

Download citation

Publish with us

Policies and ethics