25.12.2013 Views

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.2.2 Generating static graphs<br />

As described in the previous chapters, the bulk of the work was implemented using<br />

the R project for statistical computing (see Section 2.2.6). Even though R does not<br />

qualify as a scripting language or web technology, it is a powerful and widely popular<br />

graphics tool for the construction of “publication-quality diagrams and plots”<br />

(Murrell, 2005).<br />

In this project, R has been extensively used as a means of constructing high-quality<br />

graphics that enhance the interpretability of the analysis results acquired by the<br />

multivariate analysis pipeline. Since R consists of a plethora of built-in and add-on<br />

packages of great variability, it is often extremely difficult to succeed in attaining<br />

optimal functionality; therefore, this section attempts to narrow down the enormity of<br />

the range of functions down to those of most relevance to the applications covered in<br />

this thesis.<br />

6.2.2.1 R packages and functions<br />

The plot() function, as provided by the built-in graphics package (R Development<br />

Core Team, 2012), is the core function for plotting R objects, and constitutes the<br />

backbone for all other graphics packages and plotting functions. In this work, the<br />

function was used to construct simple two-dimensional scatter plots. The<br />

corresponding three-dimensional scatterplots are available through the popular<br />

scatterplot3d (Ligges and Mächler, 2003) package and the homonymous function.<br />

A major innovation in the R graphics field has been achieved with the introduction of<br />

the ggplot2 package (Wickham, 2009; Wickham and Chang, 2012). Nowadays, the<br />

ggplot2 package is widely recognised among the R users as the “best graphics<br />

package for R” (http://www.inside-r.org/packages/ggplot2/reviews/simply-bestgraphics-package-r)<br />

due to its clean and subtle aesthetics, ease of use and intuitive<br />

syntax. The package has been developed based on the Grammar of Graphics, written<br />

by Wilkinson (Wilkinson, 2005; Wilkinson et al., 2005). Each new plot consists of<br />

several independent reusable components, built in a layered grammar (Figure 6-2),<br />

where each of these features provides an additional functionality. Thus, ggplot2 is<br />

172

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!