Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

March 7, 2013

Complex Graphics (lattice) [Division of Labor?]

Filed under: Graphics,R,Visualization — Patrick Durusau @ 2:07 pm

Complex Graphics (lattice) by Dr. Tom Philippi.

From the webpage:

Clear communication of pattern via graphing data is no accident; a number of people spend their careers developing approaches based on human perceptions and cognitive science. While Edward Tufte and his “The Visual Display of Quantitative Information” is more widely known, William Cleveland’s “The Elements of Graphing Data” is perhaps more influential: reduced clutter, lowess or other smoothed curves through data, banking to 45° to emphasize variation in slopes, emphasizing variability as well as trends, paired plots to illustrate multiple components of the data such as fits and resuduals, and dot plots all come from his work.

It should come as no surprise that tools to implement principles from the field of graphical communication have been developed in R. The trellis package was originally developed to implement many of William Cleveland’s methods in S plus. Deepayan Sarkar wrote the lattice package as a port and extention of trellis graphs to R.

There is a second major package for advanced graphics in R; ggplot (now ggplot2), based on the Grammer of Graphics. Hadley Wickham wrote most of the ggplot2 package, as well as the book in the Use R! series on ggplot. My limited understanding of the Grammer of Graphics is that layers are specifications of data, mapping or transformations, geoms (geometric objects such as scatterplots or histograms), statistics (bin, smooth, density, etc.), and positions. Graphs are composed of detaults, one or more layers, scales, and coordinate systems. Again, each component has a default, so informative graphs may be produced by simple calls, but every detail may be tweaked if desired.

I do not recommend one package over the other. I started with lattice, and it may be a bit more complementary to analyses because of ease of recasting formulas from analytical functions to formulas for lattice graphs. ggplot2 may be more familiar to folks used to photoshop and other graphics and image processing tools, and it may be a better foundation for development over the next years. Both lattice and ggplot2 are built upon the grid graphics primatives, so a real wizard could compose graphics objects via a combination of both tools. This web page present lattice graphics solely because I have more experience with them and thus understand them better.

Very thorough coverage of the lattice package for R from Dr. Tom Philippi of the National Park Service.

Includes examples and further resources.

Visualization of data is a useful division of labor.

Machines label, sort, display data based on our instructions, but users/viewers determine the significance, if any, of the display.

I first saw this in a tweet from One R Tip a Day.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress