Debugging grid Graphics

A graphical scene that has been produced using the grid graphics package consists of grobs (graphical objects) and viewports. This article describes functions that allow the exploration and inspection of the grobs and viewports in a grid scene, including several functions that are available in a new package called gridDebug. The ability to explore the grobs and viewports in a grid scene is useful for adding more drawing to a scene that was produced using grid and for understanding and debugging the grid code that produced a scene.

Paul Murrell , Velvet Ly

CRAN packages used

ggplot2, gridDebug, graph, Rgraphviz, gridGraphviz, gridSVG, playwith

CRAN Task Views implied by cited packages

Graphics, Phylogenetics


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Murrell & Ly, "The R Journal: Debugging grid Graphics", The R Journal, 2012

BibTeX citation

  author = {Murrell, Paul and Ly, Velvet},
  title = {The R Journal: Debugging grid Graphics},
  journal = {The R Journal},
  year = {2012},
  note = {},
  doi = {10.32614/RJ-2012-013},
  volume = {4},
  issue = {2},
  issn = {2073-4859},
  pages = {19-27}